Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Chebli
Contributor
Contributor

how to map a text file?

Hello talend community

 

I have a file of type text contains heterogeneous information "bank statement" and I try to map in output in excel or a table in a database can help me ??

 

here is the file I am trying to map

Labels (3)
1 Reply
Anonymous
Not applicable

Hello,

 

Please take a look at the tFileinputPositional components.

https://help.talend.com/r/en-US/Cloud/studio-user-guide-cloud-api-services-platform/centralizing-file-positional-metadata

 

0695b00000KDhvkAAD.pngThis however will not solve the multi-line aspect.

 

For that I'd suggest adding a tJavaFlex with:

[begin]

int id = 0;

 

[main]

String firstCol = row2.Column0;

//i.e. it starts with 08/04 then it's a new line if it is empty then it belongs to the previous line

if(firstCol != null && firstCol.trim().length() > 4 ) { 

  id++;

}

row3.id = id;

 

Then using a tDenormalize component we can merge the fields:

0695b00000KDi30AAD.pngHere I don't add the ID column and merge without Delimiters the other columns.

Output looks like this:

0695b00000KDi3ZAAT.png 

I hope this helps.

 

Regards,

Balázs