I am looking to create a workflow that will validate output files from another workflow.
The workflow should be able to validate columns are in proper order and the datatypes are correct. I have an example schema file that I can put in as a key for the workflow.
Ideally the workflow will flag if a column or datatype is incorrect, for example flag "date" column if a country was in it.
I have never approached a task like this and any advice/ideas are appreciated.
Thank you!
Solved! Go to Solution.
@JagdeeshN , Thank you for the quick help!
I don't really know what to provide for a sample. I do not have much materialized for this workflow that would provide any help, I haven't found a way that works.
I have a schema key that will be used, the workflow would simply need to flag if the file coming through had a different column order or data types then the schema key.
In the example below, the workflow would flag the column Date due to the incorrect data type.
Date | Country | Currency | Asset |
12/12/2021 | US | $ | Stock |
12/12/2021 | US | $ | Stock |
$ | US | $ | Bond |
12/12/2021 | US | $ | Bond |
Hi @JCornn ,
From my understanding of what you are trying to achieve, i have built a sample workflow (Attached).
Please do let me know if this helps.
Best,
Jagdeesh
If you are also looking to check for values too, a join to make that comparison will do the trick.
Best,
Jagdeesh
Thank you for the help it saved our team a lot of time figuring out how to get it done.
I was also wondering if you knew of a way that would be able to dynamically change the data type to the one from the key.
Basing off the example you provided if for example "Asset" is supposed to be a byte and shows up as a string, would their be a way for the workflow to change the incorrect data types to the correct data type?
Example Key;
Example result;
Thank you,
Jcorn