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

2. how many ways to remove duplicate values?

Answers were Sorted based on User's Feedback



1.how to generate even numbers in surrogate or tranformar stage ? 2. how many ways to remove du..

Answer / 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

1.how to generate even numbers in surrogate or tranformar stage ? 2. how many ways to remove du..

Answer / pavan

To generate even numbers using transformer, we can make use
of stage variables. declare a stage variable say SV1 and
initialise it to 0. In the derivation of that stage
variable increment it by 2 which looks like SV1+2. By doing
this we can generate even numbers.

mail me @ akellapavankumar@gmail.com for more info.

Is This Answer Correct ?    6 Yes 0 No

1.how to generate even numbers in surrogate or tranformar stage ? 2. how many ways to remove du..

Answer / kumar

By using distinct we can eliminate duplicates,
by using variable comparison we can eliminate duplicates.

Is This Answer Correct ?    3 Yes 0 No

1.how to generate even numbers in surrogate or tranformar stage ? 2. how many ways to remove du..

Answer / pavan

To remove duplicates we could use Remove Duplicates Stage.
If the requirement states not to use a remove duplicates
stage, u culd use Sort stage, by setting one of its
property Allow Duplicates to false.

Is This Answer Correct ?    4 Yes 1 No

1.how to generate even numbers in surrogate or tranformar stage ? 2. how many ways to remove du..

Answer / kiran

IN surrogate key generator stage set the block size to 2
with initial value as 2, it will increment the surrogates
by 2 and will get you even numbers. I don't think in any
real world scenario you would do this as it violates
surrogate key concept. I wish the interviewer knew this
before he/she asked you.

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More Data Stage Interview Questions

What are the difference types of stages?

0 Answers  


A flat file contains 200 records. I want to load first 50 records at first time running the job, second 50 records at second time running and so on, how u can develop this job?

1 Answers   TCS,


can we half project in parallel jobs and half project in server jobs?

4 Answers   Infosys, L&T,


Hi This is Vijay, How can your remove the duplicates in sequential File?

15 Answers   HCL, Scope International,


What is the difference between account and directory options ?

0 Answers  






WHAT IS FORCE COMPILE?

3 Answers   FIS, HCL, Polaris,


i have a project manager round on sat this week can you post what are the main question i have to check.if you have any idea regular question on project pls send me. thanks in advance

2 Answers   IBM,


if the source file is CID,CCODE,CONNDATE,CREATEDBY 0000000224,1000,20060601,CURA 0000000224,2000,20050517,AFGA 0000000224,3000,20080601,TUNE 0000000225,1000,20020601,CURA 0000000225,2000,20050617,AFGA 0000000225,3000,20080601,TONE AND TARGET is oracle following are the validations cid loaded with unique records leading zeors has to be deleted while loading cid in target load only customer who got early connected to company conn_date should be loaded into oracle date format cid datatype is varchar2 in target conn_date is data datatype ccode is varchar2 0000000224,1000,20060601,CURA 0000000224,1000,20060601,CURA

2 Answers  


How much data u can get every day? 2)which data ur project contains? 3) what is the source in ur project?what is the biggest table & size in ur schema or in ur project?

2 Answers   Wipro,


Wat is pre-load in Hashed file

1 Answers   Patni,


I am defining one varaible parameter date in job parameters.I want use this variable date in where clause in source query.

2 Answers   TCS,


What could be a data source system?

0 Answers  


Categories