Alteryx Designer Desktop Discussions

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

Parse Data From TXT File with a lot of space

geeklarokcmie
8 - Asteroid

Hello experts,

 

I need help in parsing data from txt file.

 

The input txt file is attached below and I'm looking to get the data parsed into rows and columns as seen in the below table :

 

rule nameLeft CriteriaColumn OpValue LogicalRight CriteriaColumn OpValue LogicalLeft Match Group ToleranceRight Match Group ToleranceLeft ItemAdditional Info. (L)OpLeft ItemAdditional Info. (L)ToleranceException StatusCombo Rule
Desc3=2002 Eff Dt=1.=1Book Flag=1AND>1Bank Flag=2AND effectiveDateEffective DateYYYYMMDD=Effective DateYYYYMMDD1 Days No
Desc3=2002 Eff Dt=1 BICode 1=206  Reference 3=2002           
AI 206.=1Flag=1AND.=1 Flag=2AND effectiveDateEffective DateYYYYMMDD=Effective DateYYYYMMDD1 Days No
AI 206 AICode=206  Reference 3=2002           
5 REPLIES 5
Yoshiro_Fujimori
15 - Aurora

Hi @geeklarokcmie ,

As this kind of report is difficult to find a simple patten,

I would treat it as a graph paper and deal with the range on each page.

I worked on the first few columns for your reference. I hope you get the point.

 

Workflow

1271583_Workflow.png

 

Output

Page NoRowrule nameLeft CriteriaLeft ColumnLeft OpLeft Value
115Desc3=2002 Eff Dt=11Book Flag=1
117Desc3=2002 Eff Dt=11BICode=206
215AI 2061Flag=1
217AI 2061AICode=206
geeklarokcmie
8 - Asteroid

Appreciate providing this solution @Yoshiro_Fujimori. To apply your solution to 700 pages of the raw txt data doesn't provide accurate results as the data is not in the same format in every page.

 

I have pulled the txt data into excel and transformed using PowerQuery. Is there a simpler solution that can be provided for the below input and expected output? 

 

Input:

 Page 25 of 700
EffDt <= 4 dayRULE NAME
 Left Right
 Criteria = 1 Criteria = 1
 ( Column Op Value ) Logical ( Column Op Value ) Logical
 Debit or = C AND Debit or = D AND
 Credit Credit
 Reference 4 = 856 Reference 4 = 859
 Left Match Group Right Match Group
 Tolerance Tolerance
 effectiveDate
 Left Item Additional Op Right Item Additional Tolerance
 Info (L) Info (R)
 Effective DateYYYYMMDD <= Effective Date YYYYMMDD 4 Days
NoException Combo Rule
 status
 Page 26 of 700
Many DR Contract #MATCH RULE NAME
 Left Right
 Criteria = 1 Criteria >= 1
 ( Column Op Value ) Logical ( Column Op Value ) Logical
 Debit or = C AND Debit or = D AND
 Credit Credit
 Reference 4 = 086 AND Transaction = DW AND
 Type
 Reference 1 <> Reference 7 <>
 Left Match Group Right Match Group
 Tolerance Tolerance
 Left Item Additional Op Right Item Additional Tolerance
 Info (L) Info (R)
 Reference 1 = Reference 7
 Effective DateYYYYMMDD = Effective Date YYYYMMDD 30 Days
NoException Combo Rule
 status
 

Page 27 of 700

 

Output:

RULE NAMELeft CriteriaColumnOpValue LogicalRight CriteriaColumnOpValue LogicalLeft Match Group ToleranceRight Match Group ToleranceLeft Item Additional Info (L)Op Right Item Additional Info (R)ToleranaceException StatusCombo Rule
EffDt <= 4 day.=1Debit or Credit=CAND.=1Debit or Credit=DAND effectiveDateEffective DateYYYYMMDD <= Effective Date YYYYMMDD 4 Days No
Many DR Contract #.=1Debit or Credit=CAND>=1Debit or Credit=DAND          
Many DR Contract # Reference 4 =*086AND Transaction Type=DWAND  Reference 1  = Reference 7    
Many DR Contract # Reference 1<>   Reference 7<>    Effective DateYYYYMMDD = Effective Date YYYYMMDD 30 Days No

 

Ben_H
11 - Bolide

Hi @geeklarokcmie,

 

Are the pages in this report consistently formatted? If so you should be able to set up the method @Yoshiro_Fujimori suggested and just apply it to each page.

 

Regards,

 

Ben

geeklarokcmie
8 - Asteroid

The pages in the report are not consistently formatted. 

Yoshiro_Fujimori
15 - Aurora

Hi @geeklarokcmie ,

 

If the report is not consistently formatted, it is difficult to predict what will come on the next page until you see it.

So we can only try to catch as much data as possible on trial-and-error basis.

I am afraid this is all I can advise.

 

Labels