turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Home
- :
- Design and Development
- :
- How to send data one after another to three tables...

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-15-2017
07:02 AM

11-15-2017
07:02 AM

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

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

The data in T1 should be,

The data in T2 should be,

The data in T3 should be,

How an i Achieve that in talend?

Note: I am using Mysql database.

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-15-2017
07:17 AM

11-15-2017
07:17 AM

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

2 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-15-2017
07:17 AM

11-15-2017
07:17 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-15-2017
07:21 AM

11-15-2017
07:21 AM

Forgot this post.

TRF