Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Report Format file

Scheruku
8 - Asteroid

I'm trying to import report format file and facing few issues with the alignment. Attached the raw file, and below the output of the same. Request your help.

 

DATASEQPARTIDAEMPHISTCOMPLEMENTODRCRBalContaReferent
13/06/20191/412110300011SCB400002BRADSCO Lanc. : REC. VLOS 0000     .295.490,00069.075,001.2.3.01.001 (        0.1) - SAMAROISNOVEMBR/2018
13/06/20191/425150100019SCB400002DESDESCO COBRA) Lanc. : 564028.358,1097.433,101.2.3.01.001 (        0.1) - SAMAROISNOVEMBR/2018
14/06/20191/15150100001SCB400002TARanc. :030,3197.463,411.2.3.01.001 (        0.1) - SAMAROISNOVEMBR/2018
14/06/20191/22110101034SCB400002PAGAMRES. , REF DOLOR 7.4INA S/A ATES AU 0000     .07.412,80104.876,211.2.3.01.001 (        0.1) - SAMAROISNOVEMBR/2018
1 REPLY 1
danilang
19 - Altair
19 - Altair

Hi @Scheruku 

 

The nice thing about having to import Report type files is that you can be fairly sure the format is not going to change over time.  The bad thing is that these have different columns depending on the row, so you need to input the file delimited only by line breaks \n and parse the data inside the work flow.  

 

w.png

 

This workflow loads the entire file and then finds the Conta groups and the line items within them.  The top path parses the item rows and the bottom one parses the Conta rows.  Both have a different row format built into the Regex parse tools.  The only complex part after that is concatenating the Compemento column and ensuring that all the fields have values on the row your going to keep.  

 

The results look like this

 

r.png

 

Dan

Labels