Alteryx Designer Desktop Discussions

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

In what order does the Input data read files in?

wonka1234
10 - Fireball

Hi,

 

I am using the input data tool, what is the logic to reading in files? Does it take it read in files in alphabetical order? Is there a way to change the order it is read in?

I use the record ID tool on my files and want them to be read in order so my records are numbered correctly.

9 REPLIES 9
JamesCharnley
13 - Pulsar

Hi @wonka1234 

 

I'm kind of assuming you mean starting with a directory tool and not an input here if you're pulling in multiple files? If so then the files are being read in with the oldest files first. You'd be able to apply some sort logic to the files after if you needed them in a different order.

wonka1234
10 - Fireball

@JamesCharnley  No I mean input data. Where you input all data from a directory using something like O:/Alteryx/Community/Test*.xlsx.  which would read in files with the same schema.

JamesCharnley
13 - Pulsar

If you're wildcard unioning then you could take the file name as a field within the input and then sort based on that field later regardless of the order it's being read in. You'd then be able to sort alphabetically in the sort tool

wonka1234
10 - Fireball

@JamesCharnley   I wouldnt say its dynamic input. I dont use that tool. Its input data only with a browse.

I want it to read in files from the directory in alphabetic order 

ShankerV
17 - Castor

@wonka1234 

 

I would suggest to read all the file names you need to read.

 

Then sort in order you are interested to pull in the datas.

 

Then use the dynamic input tool.

 

Many thanks

Shanker V

JamesCharnley
13 - Pulsar

Yeah apologies I just straight up didn't read your message properly. It's edited to what I think you mean now

ShankerV
17 - Castor

Hi @wonka1234 

 

This will solve your 

 

ShankerV_0-1669214389705.png

 

 

Many thanks

Shanker V

ShankerV
17 - Castor

@wonka1234 

 

ShankerV_0-1669214503132.png

 

Will explain how this will solve the order.

 

You are reading the file names with Directory tool,

As we are aware that file Test1 will contain Record ID 1 to 20

Test2 will contain Record ID 50 to 60

Test3 will contain Record ID 21 to 49

 

In the sort, make Test1, Test3 and Test2 as order.

 

After the dynamic input, you can see all the records pulled in order.

From 1 to 60

 

Kindly accept this solution if it provided a solution to your question.

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @wonka1234 

 

Curious to know whether your issue was resolved?

 

Many thanks

Shanker V

Labels