Skip to main content

How to 

Check whether the target column has only DATE values or not.

?

Hi,

if you have the data with the column (Catalog Item) in a catalog, you can check the profiling results to see what the data in the column look like.

 

Does that answer your question?


Hello @anna.spakova I need to write DQ Evaluation rule to check whether the data in the column is in intended data type. Eg., Is the column defined as integer and all contents of the column as integer?


Hello @KarthikaSPillai , thanks for clarifying. I don’t think there is some native check for the data type. You see the data type after the Catalog Item is imported into Catalog and as I mentioned above, you can verify in the Profiling results, if the values correspond to what you expect.

From the DQ rules perspective, you can write rules that will check if the values are e.g. only numbers (example would be to use trashNonDigits function and compare to the original value) etc., but I can imagine this can get pretty complicated for DATE as you can have different date formats. You may need to use some regex expressions… Also important is to keep in mind that the rule can get assigned only to the attribute with the corresponding data type as the input attribute of the rule (so if you have an INTEGER column, you are not able to assign rule with STRING as an input attribute).


You can assoicate a term to this column and have DQ rules associated to TERM, this will ensure the underlying rule is executed whenever you reprofile and validate dq evaluation results


Reply