We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Dynamic date input from Directory

Kaish
8 - Asteroid

Hi all, I have a condition where in a directory I have many files but I want only the selected excel date file to be imported, the files have specific date format Ex. xxxxx_20240920, which is yyyymmdd format , so here I want only the files to be imported when I dynamically choose date from interface tool,

 

Ex. Files in Directory -  Book_20240917 , Book_20240918, Book_20240919, Book_20240920, Book

You can create a sample excel files with these names, now my condition is I will select a date in interface tool for suppose 19th Sept, So the input will have only data from Book_20240919, excluding any other data, I want all the data from Book_20240919, Or else if I select 20th Sept in interface tool it will select only data from Book_20240920, so here the most important factor is extracting only those files which I have selected as my date in interface tool, need to use interface tool to manually select the date. Can this be done ?

15 REPLIES 15
binuacs
21 - Polaris

@Kaish Are you getting schema error with dynamic input tool? If that is the case you need to use batch macro instead of dynamic input tool

Kaish
8 - Asteroid

With excel file I was able to resolve the problem with your solution, but when I want .txt file to be readable in Alteryx, while setting up .txt file in dynamic input data, the file is not loading, it loads an error with a note too many fields in record #1, how can I resolve this issue and load my .txt data date wise ? 

binuacs
21 - Polaris

@Kaish if it is .txt files then you need to change the delimiter to \0 also increase the record length

image.png

 

Kaish
8 - Asteroid

As per requirement, I want those data in different columns, they are all coming in 1 string column, and I don't have any delimiter to differentiate text to columns data.

binuacs
21 - Polaris

@Kaish then your .txt files should be in fixed length, in that case you need to split based on the position,

Kaish
8 - Asteroid

Any way how I can fix this problem ? any way where I can read my data properly, few .txt files are readable with delimiter set as /t, but few files with same format is not readable, how to fix this ?

  

Labels
Top Solution Authors