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

Tags (1)

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.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download