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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to send data one after another to three tables in cyclic order in talend?

I have one source table,the data in source table is like,

0683p000009LreR.jpg

I have 3 target tables T1,T2 and T3. I want the output as follows,

The data in T1 should be,

 

0683p000009Lrfh.jpg

The data in T2 should be,

0683p000009Lrvt.jpg

The data in T3 should be,

0683p000009LrvQ.jpg

 

How an i Achieve that in talend?

Note: I am using Mysql database.

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Connect your data to a tMap with 3 outputs. Create an integer tMap variable with a sequence generator....

 

routines.Numeric.sequence("seq", 1, 1)

In each of your outputs use a filter with following logic....

 

Table1

Var.seq%3==1

Table2

Var.seq%3==2

Table3

Var.seq%3==0

This is using a modulus operator which will return 1 when a number is not divisible by 3 and has a remainder of 1, 2 when a number is not divisible by 3 and has a remainder of 2 and 0 when the number is divisible by 3. This will allow you to cycle your outputs as you wish 

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Connect your data to a tMap with 3 outputs. Create an integer tMap variable with a sequence generator....

 

routines.Numeric.sequence("seq", 1, 1)

In each of your outputs use a filter with following logic....

 

Table1

Var.seq%3==1

Table2

Var.seq%3==2

Table3

Var.seq%3==0

This is using a modulus operator which will return 1 when a number is not divisible by 3 and has a remainder of 1, 2 when a number is not divisible by 3 and has a remainder of 2 and 0 when the number is divisible by 3. This will allow you to cycle your outputs as you wish 

TRF
Champion II
Champion II

Forgot this post.