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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mmoye
Contributor
Contributor

simple tLoop? modify data on each iteration

Hello,

 

I am very new to Talend and trying to figure out tLoop. I am using tMap to simply transfer data from one postgresql table to another:

0683p000009M2Ie.png

0683p000009M2Ij.png

I would like to be able to do the following. For every row in the input, i would like to insert four records in the output with just one field from the input. However, I would like to modify the data slightly for each.

 

So for example from above I have uuid in row2 table. On the right in output I want that one uuid to be repeated 4 times but with the following modification:

iteration       input           output ("role" field)

1                  uuid             uuid (as mapped in graphic above)

2                  uuid             uuid + "_a"

3                  uuid             uuid + "_b"

4                  uuid             uuid + "_c"

The output would only be for the "role" output field as seen above. The description field remains the same for each iteration (just uuid).

How can i achieve this? Seems like it would be really simple but it is stumping me.

 

Thank you for any assistance!

Labels (2)
1 Solution

Accepted Solutions
akumar2301
Specialist II
Specialist II

 

Screenshot for lookup ( you can use any input file as well)0683p000009M2BZ.jpg

 

2nd tfixedinput would be you tDBinput component main flow.

View solution in original post

4 Replies
akumar2301
Specialist II
Specialist II

 

Create a loopkup file with string needed with four line ( 1st line space)


_a
_b
_c

 

and in tmap logic as mentioned below

 

0683p000009M2J3.jpg

 

let me know if it works.

mmoye
Contributor
Contributor
Author

Sorry, like I said I'm really new to Talend. How is tFixedFlowInput used?

akumar2301
Specialist II
Specialist II

 

Screenshot for lookup ( you can use any input file as well)0683p000009M2BZ.jpg

 

2nd tfixedinput would be you tDBinput component main flow.

mmoye
Contributor
Contributor
Author

Brilliant, and I never would have come across it. Thank you so much!