Alteryx Designer Desktop Discussions

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

Data Validation

vijaylnyadav
8 - Asteroid

Is there any solution or tool with the help of which I can check if there is any data present or not.

If any data is there then it should pass through the workflow and if no data is there then it should block that data and stop the data to flow for any further validation.

6 REPLIES 6
leon2020
7 - Meteor

In the developer tab, there is a tool called "Test".

leon2020_0-1608293979549.png

 

In your specific case, just before this test tool, I would add the "Count Records" tool from the Transform tab.  In the test tool configuration, selecting Expression is true for first record, and entering the test expression "[Count]>0".

leon2020_2-1608294296396.png

 

This will throw an error when this test fails.  In the Workflow runtime configuration, you can cancel the workflow on error (the first tick box).

leon2020_0-1608294469166.png

 

 

marcusblackhill
12 - Quasar
12 - Quasar

Hey @vijaylnyadav !

 

Will be better if you can provide more information about your situation, but in alteryx have some different ways to you do that type of check, you have the error message tool and even join tool depending the case.

 

hope that help!

vijaylnyadav
8 - Asteroid

i am passing two type of data that is flowing and i am taking a union of that and after that I am using filter.

The issue I am facing is that after applying a filter the false has no data but it is passing a column names. and after false I have another workflow according to the situation. so following error is shown 

 

Parse Error at char(1): Unknown Variable "variablename"

marcusblackhill
12 - Quasar
12 - Quasar

@vijaylnyadav 

 

Well I'm not sure if I understood well but a way to solve this can be a combination of tools to be sure you don't will have any columns with no data. Look the example attached.

marcusmontenegro_0-1608295070468.png

Hope that helps

vijaylnyadav
8 - Asteroid

You are not getting my point.

 

Consider,

file a and file b

If i am uploading both files then there is no error.

if i am uploading only file a then i am getting error at false side,

and if i am uploading only file b then i am getting error at true side.

 

i am using union before filter so both the files have different column schema and after filter data is not passing but column name is passing with no data.

 

Please suggest me solution so that i can complete it.

Thanks 

 

leon2020
7 - Meteor

What's the error?  I guess some columns are missing when the files are not loading...

 

It sounds like you are already doing this, but nonetheless a possible solution is to add a text input parallel to the file, and manually entering the column headings you expect, with null data.  Union this with the file input.  When you upload a file, there is no difference but if not file is uploaded, the data headings will exist in the workflow.

 

If the error occurs at the union, you can change the configuration to ignore "when fields differ"... might be worthwhile going through the configuration of the file inputs and other tools too to see if you can capture/handle the error.

 

leon2020_0-1608315377039.png

 

Labels