i want send my all duplicate record one tar and all uniq
records one target how we will perfome explain
example:
input data
eid
251
251
456
456
951
985
out put/target1
251
251
456
456
out put/target2
951
985
how we will bring
Answers were Sorted based on User's Feedback
Answer / anil
Hi,
This can be do easily with loops in transformer stage
Design
--------
Sq File - > Aggregrate - > Transformer - > Unique
|
Duplicate
1. In aggregate, calculate no of rows say counts
2. In transformer , define a stage variable stgTest whose derivation is if counts > 1 then 'Duplicate' Else 'Single'
3. In the loop condition define @iteration < Counts
4. Take a loop variable saying lopNumbers = EID
5. Now for Unique link write constraint as stgTest = 'Single' and output derivation of EID = @iteration.
6. Now for Duplicate link write constraint as stgTest = 'Duplicate' and output derivation of EID = @iteration.
7. Now you will get duplicate values in one link and unique values in another link.
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / sreenu
Using aggregation and filter stage,
In aggregation stage we calculate the count of incoming
records and in filter we use count<>1 for output1, count=1 for
output2...
| Is This Answer Correct ? | 1 Yes | 4 No |
Answer / vsandu
just sort the data ,and bring key changevalues by using
sort ,
in transformer write a logic if group id is 1,0 then target
1 else if group id is anly 1 then target2
as per my knowledge ,if any mistake correct me
| Is This Answer Correct ? | 1 Yes | 6 No |
hi All, i have one scenario like if source--->transformer-->2 target sequential files the 1 st target sequential file is loads the data from source and 2nd target sequntial file contain the 1st target total record count,and file name of 1 st target seq file and timestamp seperated by delimeter for example if source have 10 record the 1st target seq file hav 10 records and 2nd target seq file example 10|xyz.txt|20101110 00:00:00 could you please help me out how can i implement in datastage job.
I have a scenario like Deptno=10---->First record and last record Deptno=20---->First record and last record Deptno=30---->First record and last record I want those first and last records from each department in a single target. How to do this in DataStage, any one can assist me. Thanks in advance.
What are transforms and what is the differenece between routines and transforms?
Why do we use exception activity in Datastage?
What is the version control how can i apply this in DataStage can any one tell me the anser
how to get the unique records on multiple columns by using sequential file stage only
What are the repository tables in datastage?
What are routines in datastage?
What is the use of surrogate key stage?
What is size of a transaction and an array means in a datastage?
what is the function in Transformer stage can act as Rank function in Oracle
Difference between sequential file and data set?