Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

How to create a date column in each file when using Directory and dynamic input

ankurrjit
8 - Asteroid

I have a workflow which is using "Directory" input and then Dynamic input based on "FULL PATH". each file from full path is having a date field "Effective date", I want to add another field "Date Created" alongside which holds the min or max effective date from the same sheet.

 

The reason is there are many rows in each file having NULLS for field "Effective Date". 

 

I tried many options formula and the multi-row formula but it is giving weird results. 

 

Please note that the output of the workflow is set as CSV with "Max Records Per file" as 1048570, so it is combining a set of files and then creating new files for another set of files.

 

Please help.

 

ankurrjit_0-1591111420074.png

 

ankurrjit_1-1591111445113.png

 

ankurrjit_2-1591111474025.png

 

 

6 REPLIES 6
RobertOdera
13 - Pulsar

HI, @ankurrjit 

 

Kindly consider posting a packaged workbook.

That way, we can work the problem.

Dummy files with one dummy colA should suffice, .

Cheers!

ankurrjit
8 - Asteroid

Hi @RobertOdera  - Thanks for the reply. I am attaching packaged workflow and sample files.

RobertOdera
13 - Pulsar

Thanks @ankurrjit 

 

I'm sure this will be helpful for the Community.

I will also take a look tonight, so you should have something from me tomorrow AM.

Cheers!

RobertOdera
13 - Pulsar

Thanks for the files @ankurrjit 

 

Kindly clarify the following for me:

1. each file has only 1 sheet with data on it?

2. you're using the Directory Tool as a means on streaming in a Last Processed Date stamp that you can leverage as a filter?

3. you want to create a new column 'Date_Created' which would be a concatenation of the 'min effective date - max effective date' or just the 'min effective date' or just the 'max effective date'? choose one.

4. you want to replace the date pattern (20200530) in the file name string with the newly created 'Date_Created' field value?

5. what is the behavior when you have more data records than you record limit? Are you splitting the data to output as different files?

 

Cheers!

ankurrjit
8 - Asteroid

Hello @RobertOdera  - I have made it work. Here are the details.

 

In dynamic input I selected the option "output file name as field" and pass the "filename only". All the files which are generating are having their creation date as a suffix. Next step I am picking the date out of this field and using it as date created. Thanks a ton for looking into this for me.

 

ankurrjit_1-1591213041093.png

 

 

 

ankurrjit_0-1591213000460.png

 

 

ankurrjit_2-1591213079925.png

 

 

 

RobertOdera
13 - Pulsar

Sure thing, @ankurrjit 

Glad it worked out for you!

Cheers.

Labels