Alteryx Designer Desktop Discussions

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

Splitting a text file into multiple files

kristinfreitas
7 - Meteor

I have a large text file that has many page breaks that are denoted by a line "___________________".  I need to create separate text files for each section (create a separate file at each page break).  I am new to using Alteryx and not sure how I can do this.  Thanks in advance!

5 REPLIES 5
ponraj
13 - Pulsar

Possible to share sample data ?

kristinfreitas
7 - Meteor

I have attached a small amount of sample data. Thanks!

danilang
19 - Altair
19 - Altair

@kristinfreitas

 

Here you go. 

solution.png

 

The mulit-row formula  creates a new filed called FileSuffix that get incremented every time it finds a "_______".  The output tool is configured to add the suffix to the output file name and so creates a new file every time the suffix changes

 

output tool.png

 

It currently includes the "__________" row in the output files.  If you want to remove them add a filter after the multi-row tool and set the custom filter to 

 

!Startswith( [Field_1],"________") 

 

Dan

 

ponraj
13 - Pulsar

Here is the sample workflow for your case. Hope this is helpful. 

 

 

WorkflowWorkflow

 

kristinfreitas
7 - Meteor

Thank you!

Labels