1.how to generate even numbers in surrogate or tranformar
stage ?

2. how many ways to remove duplicate values?

Answer Posted / subhash

1) By using Stage variables in transformer, we can generate even numbers,
Declare a stage variable - SV1 and initialize to '0'.
In the derivation of that stage variable increment by 2.
i.e. SV1=SV1+2.

By using Surrogate key in transformer, use the below logic in derivation part.
Surrogate_Key -----> If mod(Surrogate_Key,2)= 0 then Surrogate_key Else Surrogate_Key + 10000001

2)Removing Duplicates
a. By using Remove Duplicates Stage.
b. By using SORT Stage,Sort on KEY Column and set 'Allow Duplicates' to 'FALSE'
c. By using Link Partitioning, use 'HASH partition' on KEY Columns and Select Perform Sort and UNIQUE options.
d. By using Transformer Stage Variables,
SV2----->If SV1=KEY_Column then 0 Elso 1
SV1----->KEY_Column
In the Constraint Part give as,
SV2=1

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between IBM DATA STAGE8.5 and DATA STAGE9.1 ?

3368


What are transforms and what is the differenece between routines and transforms?

609


What are the functionalities of link partitioner and link collector?

594


What is the differentiate between data file and descriptor file?

856


Can you explain players in datastage?

701






Name the different sorting methods in datastage.

607


What are the some differences between 7.x and 8.x version of datastage?

733


how to run a sequential file stage in parallel if the stage is used on the TARGET side

1129


What is ibm datastage flow designer?

679


What is a merge?

663


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

1744


What is process model?

1547


If you want to use the same piece of code in different jobs, how will you achieve it?

628


How complex jobs are implemented in datstage to improve performance?

587


What is the different type of jobs in datastage?

566