loading data in different targets

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
harivasireddy
Participant
Posts: 26
Joined: Mon Oct 25, 2010 6:09 am
Location: Hyderabad

loading data in different targets

Post by harivasireddy »

Hi Everyone,

I have one source file with 100 records and I have 3 targets(datasets).
My requirement is loading the source data as
1st record should go to first target Dataset,
2nd record should go to 2nd target Dataset,
3rd record should go to 3rd target Dataset and then

4th record should go to 1st target,
5th record should go to 2nd target,andn
6th record should go to 3rd target and then

7th record should go to 1st target and so on....(until last record)

Can any one tell me the way, how I can do this without using any partitionsing techniques..

Thanks in Advance.
Thanks & Regards,
HARIRAM
Software Engineer
manoj_23sakthi
Participant
Posts: 47
Joined: Tue Feb 23, 2010 12:16 am
Location: CHENNAI

Re: loading data in different targets

Post by manoj_23sakthi »

Hi,
This can be obtain
<File100records> + <Column Generator>
(Create a new column with datatype char and give Input as 1st value A,2st value B,3st value C,)

<Use transformer or filter or switch > and split A,B,C
you can obtain 3 Datasets us you Required
Regards,
Manoj
harivasireddy
Participant
Posts: 26
Joined: Mon Oct 25, 2010 6:09 am
Location: Hyderabad

loading data in different targets

Post by harivasireddy »

Thanks for your response.

But, Iam not clear by the above.
If I have five targets, what I need to do.Can you please tell me in a detailed manner.
Thanks & Regards,
HARIRAM
Software Engineer
radhakantkumar@gmail.com
Participant
Posts: 3
Joined: Mon Sep 13, 2010 4:08 am

Post by radhakantkumar@gmail.com »

hi
i am completely Agree with above answer here i am giving new solution for loading into different target in cyclic order of 3..
take transformer after source data and generate a sequence order and store into a variable say Sv
and write three constraint .
1)Sv=1 or mod(sv,3)=1
2) Sv=2 or mod(sv,3)=2
3) Sv=3 or mod(sv,3)=3
This is example for three different target u can add for more....

thanks&regards,
Radhakant
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Mod(sv,3) can never be 3.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
radhakantkumar@gmail.com
Participant
Posts: 3
Joined: Mon Sep 13, 2010 4:08 am

Post by radhakantkumar@gmail.com »

ray.wurlod wrote:Mod(sv,3) can never be 3. ...
Oh you are right ray.. please make it 0 in place of 3 that mean
Mod(sv,3)=0
sach
Post Reply