Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

BLANK TEXT FILE

Yuvaraj85
7 - Meteor

If the text is not having any data then that text file need to be skipped and rest of the text files need to be parsed. Please help me on this

18 REPLIES 18
Raychrls
7 - Meteor

In these cases, you have to think like the bot -- You want it skipped but the way the bot can "skip" it is by pulling it in and then excluding the blank lines from the data via a filtering tool or something else. I hope this helps!

Yuvaraj85
7 - Meteor

f you give some example will be greatly appreciated 

gawa
16 - Nebula
16 - Nebula

@Yuvaraj85 

If you have multiple .txt files, input data by using wild card * to read all text data.

Once data is read, use filter tool to filter empty data. *Empty means "Null" or "Empty string". See attached yxzp.

image.png

jdminton
12 - Quasar

Hi @Yuvaraj85 .I think that this is the issue you might be running into.

Snag_34db551e.png

 

If so, switch to directory and dynamic input. You can then filter the directory to remove size 0 files:

Snag_34dbfeac.png

 

The remainder of the text files can then flow through the process. You could also set up a run command tool to read in the files from the directory to move or delete size zero files before running your normal workflow. Either method should eliminate the blank text files. If you have headers but no data, use the method shared by @gawa 

Yuvaraj85
7 - Meteor

This is not working as we have separate layout file to delimit the text file.

 

Yuvaraj85
7 - Meteor

Even this is also not working since I have separate layout to delimit it. Once I use filter in the basic filter when I tried to select column it show as no records

jdminton
12 - Quasar

@Yuvaraj85  Can you please share your workflow so we can help? The directory method I shared will happen before any layouts as the layout will occur in the dynamic input, but I cannot understand what you are describing.

Yuvaraj85
7 - Meteor

Here is the work flow, Could you please advise 

jdminton
12 - Quasar

I see that in the dynamic input you need to change the Action to "Change Entire File Path". Also, the false anchor for the filter would not have any data and would error. You can change to a Browse tool to see which files fail. See attached. Let me know if this is working or if you have any other issues.

Labels