runtime # of loop in Talend Data Mapper

Six Stars

runtime # of loop in Talend Data Mapper

Hi 

 

I am processing an incoming Mainframe file, which has data format simillar to the below xml.  In the message No_of_Transactions field will say how many number of transactions will come under that branch header. Single file will have many branch headers. I am converting the output to a Flat CSV format.

 

How can i perform loop in such scenario, by taking the value from the another key?

 

sample.JPGInput DataFormat


Accepted Solutions
Six Stars

Re: runtime # of loop in Talend Data Mapper

I just depicted the input in xml format, but my source was mainframe data with fixed length data in EBCDIC format. As the expected data is 3 times and some times data comes less than that. I had the loop for 0 to 3 times. So when i receive the data less than 3, it was generating null records.

 

I have handled it with the if clause expression on the simple loop checking for not null. It worked.


All Replies
Five Stars

Re: runtime # of loop in Talend Data Mapper

Hi, 

If you want to save all of your transaction details you have to iterate using the Transaction_detail node as XPath loop expression and you will get all of them. Then, you can access the other elements inside the Branch_Header using relative paths.

Six Stars

Re: runtime # of loop in Talend Data Mapper

I just depicted the input in xml format, but my source was mainframe data with fixed length data in EBCDIC format. As the expected data is 3 times and some times data comes less than that. I had the loop for 0 to 3 times. So when i receive the data less than 3, it was generating null records.

 

I have handled it with the if clause expression on the simple loop checking for not null. It worked.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now