Free Trial

Alteryx Designer Desktop Discussions

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

Formatting a flate file

IJH34
8 - Asteroid

Not sure if this is possible in alteryx, but wondering if I would be able to format a flat file correctly.

i.e. putting field names as header across multiple columns and taking the corresponding data and placing it in the correct colum. 

Notice that the second persons information contains a field that would fall into Address 2, while the first persons address 2 field would be null. 

 

CURRENT FORMAT:

hhnumber   Name   Address1   Address2   City   State   Zip   OverallMatch   Age   Age_Indicator   Estimated_Income_Code   No_Mail_Flag   FILLER1   Positive_Match
2   JOHN DOE   123 LONG RD   WONDERLAND   MA   01375-9474   M   36   I

6   M
6   JANE DOE   777 FLYING CLOUD DR   APT 333   EDEN PRAIRIE   MN   55344-3834   M   30   I 

 9 M

 

DESIRED FORMAT:

hhnumberNameAddress1Address2CityStateZipOverallMatchAgeAge_IndicatorEstimated_Income_CodeNo_Mail_flagFiller1Positive_Match
2JOHN DOE123 LONG RD WONDERLANDMA01375-9474M36I6M  
6JANE DOE777 FLYING CLOUD DRAPT 333EDEN PRAIRIEMN55344-3834M30I9M  
4 REPLIES 4
grossal
15 - Aurora
15 - Aurora

Hi @IJH34,

 

would you mind sharing a minimal version of the flat file? It's easier if we can explore and test it.

 

 

Best

Alex

IJH34
8 - Asteroid

@grossal I've attached a sample of the file. Formatting, spacing, and field names all remain the same, however I've stripped away any PII. Enjoy the Avenger themed data set.  

grossal
15 - Aurora
15 - Aurora

Hi @IJH34,

 

that's why I love sample data. The solution is just two clicks away! 

 

grossal_0-1586536978961.png

 

During the import Select "Read it as a delimited text file" and choose "Tab".

 

Output:

 

grossal_1-1586537021179.png

 

Workflow for prove:

 

grossal_2-1586537032571.png

 

 

I'll attache the "workflow" anyway 😉

 

Best and have fun with the data 😃

Alex

 

 

PS: Why does this work? First of all it's not truly multi line, it's just shown as multi-line. Second, it uses Tabulators instead of whitespaces, therefore it's easy to parse.

IJH34
8 - Asteroid

Wow! Could it have been any easier? Thank you so much! 

Labels
Top Solution Authors