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
On which interface you will be working as a developer?
Distinguish between informatica & datastage. Which one would you choose and why?
Explain connectivity between datastage with datasources?
how to delete one row in target dataset
How do you register plug-ins?
What are the various kinds of the hash file?
How a routine is called in datastage job?
What is the difference between validated and compiled in the datastage?
Define meta stage?
Source has 2 columns: USA,NewYork INDIA,MUMBAI INDIA,DELHI UDS,CHICAGO INDIA,PUNE i want data in target like below: INDIA,MUMBAI1 INDIA,DELHI2 INDIA,PUNE3 USA,NEWYORK1 USA,CHICAGO2
How to write a expression to display the first letter in Caps in each word using transformer stage ? Please let me know ASAP Thanks in advance...
Can you explain engine tier in information server?
What is the use of datastage designer?
Name the different sorting methods in datastage.
which r the connectors used in san?