Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Flag Incorrect Data Types and Columns

JCornn
7 - Meteor

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!

 

 

6 REPLIES 6
JagdeeshN
12 - Quasar
12 - Quasar

@JCornn 

 

Can you please provide some samples.

JCornn
7 - Meteor

@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. 

DateCountryCurrencyAsset
12/12/2021US$Stock
12/12/2021US$Stock
$US$Bond
12/12/2021US$Bond

 

JagdeeshN
12 - Quasar
12 - Quasar

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

JagdeeshN
12 - Quasar
12 - Quasar

@JCornn 

 

If you are also looking to check for values too, a join to make that comparison will do the trick.

 

Best,

Jagdeesh

JCornn
7 - Meteor

@JagdeeshN , 

 

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;

JCornn_0-1629904678006.png

Example result;

JCornn_1-1629904691675.png

 

Thank you,

Jcorn

JagdeeshN
12 - Quasar
12 - Quasar

Hi @JCornn ,

 

Glad I could help.

 

Changing the datatype dynamically is a little tricky. But I believe the Multi Field Formula tool should do the trick.

 

Please find below a discussion wherein @DavidP  has described with a working example on how this can be done.

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Dynamically-change-data-type-of-fields...

 

Hope this helps.

 

Best,

Jagdeesh

 

 

Labels