Separate and iterate rows content

Highlighted
Seven Stars

Separate and iterate rows content

 

Hi,

 

I have an array saved at tHashInput_2, I have different rows, each one is an element from the array.

 

I am saving the content of the rows using context variables with tJavaRow. The problem is that I am sending two rows at the same time to txmlmap. What I would like to do is creating a loop that could store the content from the row1 to the context variables, execute the program and then execute again the program with the data from row2.

 

1.JPG

 

To make it more clear, tHashInput_2 should send just the first row to tXMLMAP, save the information and execute the rest of the job. Once the job is executed, send the second row(array[1]) and execute the job again

 

2.JPG

Tags (2)

Accepted Solutions
Fifteen Stars TRF
Fifteen Stars

Re: Separate and iterate rows content

Hi,

If I understand your question, you need to iterate over the content of the tHashInput.

So, just add a tFlowToIterate after tHashInput_2, by default it will create a global variable for each field, then using a tJavaXxxx component you can populate your context variables with these global, or use the global instead of context variables in the following components.

Hope this helps.


TRF

All Replies
Fifteen Stars TRF
Fifteen Stars

Re: Separate and iterate rows content

Hi,

If I understand your question, you need to iterate over the content of the tHashInput.

So, just add a tFlowToIterate after tHashInput_2, by default it will create a global variable for each field, then using a tJavaXxxx component you can populate your context variables with these global, or use the global instead of context variables in the following components.

Hope this helps.


TRF

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

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read