Alteryx Designer Desktop Discussions

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

File not Found, but still want to proceed. How?

rromeo
7 - Meteor

Have a situation where I am getting data files that have 2 different but similar schemas. Trying to import both into same data set in Alteryx.

 

Created the following workflow.

 

Folder A: Data files conforming to schema A placed here.

Folder B: Data files conforming to schema B placed here.

 

Input tool A Imports files from folder A.

Resulting data set passed to select tool where certain fields are unchecked

 

Input tool B Imports files from folder B.

Resulting data set passed to select tool where certain fields are unchecked

 

At this point, those 2 data sets should have the same schema and are joined via Union tool.

 

Problem arises when there are no files in one of those folders.  My intention was that the result of the union would be all the data from whatever files were imported, even if one of the input tools found no files, but when one data set fails to find input files, the downstream effect is the union fails.

 

Any suggestions?

 

 

 

6 REPLIES 6
Amarendra
10 - Fireball

What if you used a text input tool as a template (with all the necessary fields) with empty records? It would still run and the union would not fail.

ImadZidan
12 - Quasar

Hello @rromeo ,

 

Can you try on the union tool to choose the following option and see if it checks out.

 

lets us know

Union.PNG

rromeo
7 - Meteor

The problem is, I am trying to account for situations both when files will exist and when they won't.  There will always be data in at least one of the 2 folders, but I won't know ahead of, which, if either, of the folders will be empty.

 

So when the workflow runs, the very first thing that happens is the input tool from the empty folder generates an error.  Not sure I'm clear on where the text input tool would come into the equation.

rromeo
7 - Meteor

I tried

Igonore - Continue processing records

Output all fields

 

 

And I tried

Manually configure fields.

 

Both fail to pull in the records from the data set from the input tool pulling from the non-empty folder.

Amarendra
10 - Fireball

My assumption is that the files that sit in these two separate folders have a consistent schema? If Yes, you can leave a template file in each of the folders always and let Alteryx pick it up (you can use the directory tool) along with your original files. Since the template is always empty, your flow wouldn't break.

danilang
19 - Altair
19 - Altair

Hi @rromeo 

 

You can do this by replacing each Input tool with a Directory tool followed by a Dynamic Input.   

 

danilang_0-1599679720233.png

 

The dynamic input tools reference a template file that is included in a subdirectory of the workflow  These template files have the correct schema based on the directory they are reading.  The Dynamic Input tools read all the files that are passed to them from the Directory tool.   If the source directory is empty meaning that the Directory tool will output 0 records, the Dynamic input will still output an empty record with the correct field names and types based on the template file.  

 

Dan

 

 

 

Labels