Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

I have a input as:

Col
1
1
2
2
3

I want 3 output as:

Output1:

1
1

Output2:

2
2

Output3:

3

i.e. same duplicates should be in one target, other duplicate values should be in another target and so on.. Pls help

Answer Posted / sher

something like below should work...

Job#1
Read in transformer to add a new column sequence the value of sequence will be initially 1 and increment when key changes…
so output(A) will look like…
1 1
1 1
2 2
2 2
3 3
4 4
B 5
under job sequence, use a job activity to read(A) use tail -1 and | cut to read 2nd column. we get 5..
Now, use start loop activity and end look activity stage in job sequence to create a loop from 1 to jobactivity.output incrementing by 1..
The look will now run 5 times.. inside the loop, call a job and pass the value i.e 1,2,3,4,5 each time it runs.
Inside the called job, read the input file(A) pass to transformer and then use constraint to write only records where 2nd column = variable passed and drop column 2..
Output of transformer.
1st loop output
1
1
2nd loop output
2
2
and so on...
when writing the file, use the passed variable in file name, so file name is distinct

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between Datastage 7.5 and 7.0?

1148


Can you explain kafka connector?

1370


What is a ds designer?

1111


If we take 2 tables(like emp and dept),we use join stage and how to improve the performance?

2098


Define meta stage?

1254


what is the custome stage in datastage? how can we impliment that one? plz tell me

2406


in oracle target stage when we use load option and when we use upsert option?

2323


Hi everyone,I have kept a project Sales And Distribution for a pharmaceutical company.can anybody explain one complex business rule that we had in our project and how did you accomplish it using DS?

2279


tell me 5 situations when we r using oracle db stages like orecle connector, oracle enterprise

3179


Define ds designer?

1324


What are stage variables and constants?

1193


How many areas for files does datastage have?

1212


1.new record it will insert but changes of natural key is not present in taget i want to update (here key is composite natural key )can any one help this to explan how to do

2137


Differentiate between Symmetric Multiprocessing and Massive Parallel Processing?

1265


Differentiate between validated and Compiled in the Datastage?

1345