if we using two sources having same meta data and how to
check the data in two sources
is same or not? and if the data is not same i want to abort
the job ?how we can do this?



if we using two sources having same meta data and how to check the data in two sources is same or ..

Answer / subhash

SeqFile1----->|
.................|ChangeCapture--->Transformer--->TGT
SeqFile2----->|

SeqFile1 & SeqFile2 are the inputs to Change Capture.
From the output Change Capture Stage we one extra column
‘Change Code’.
If, the record is same in both file, i.e. Copy Record.
Change Code=0
If, the record is only in SeqFile1, i.e. insert Record.
Change Code=1
If, the record is only in SeqFile2, i.e. delete Record.
Change Code=2
If, the record is in both files but with some modifications,
i.e. edit/update Record. Change Code=3

If all Change are '0' then 2 files having same Data.

In the transformer constraints, we can mention as ‘ change
code <>0’ then set ‘Abort After Rows’ to ‘1’.

Is This Answer Correct ?    9 Yes 2 No

Post New Answer

More Data Stage Interview Questions

Hi guys, 7. how to get this output i/p col1,col2 101,a 102,b 103,c 104,d o/p col1,col2 101,d 102,c 103,b 104,a Thanks

2 Answers   Cap Gemini, IBM,


what is the use of surogate key in datastage

3 Answers  


HOW WILL YOU IMPLEMENT SURROGATE KEY IN SCD BY USING SURR_KEY GENERATOR,THE VALUE OF S_KEY SHOULD NOT REPEAT EVEN IF THE JOB IS COMPILED REPEATEDELY?

4 Answers   L&T,


I am running a job with 1000 records.. If the job gots aborted after loading 400 records into target... In this case i want to load the records in the target with 401 record... How will we do it??? This scenario is not for sequence job it's only in the job Ex: Seq file--> Trans--> Dataset..

9 Answers   Cognizant, IBM, TCS, Virtusa,


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

5 Answers   Cap Gemini,






how many datamarts we will use in real time project and when will use the datamart?pls send the replay early

2 Answers   Tech Mahindra,


What modeling tool do you use?

6 Answers   HP,


Hi this madan, in data stage one file in Empno 12345678910 in a table, i want target is  Empno 1                                2 3 4 5 6 7 8 9 10                                                                                             

5 Answers   Tech Mahindra,


Hi all, explain one complex business rule that you had in your project and how did you accomplish it using DS?

1 Answers   HCL,


How do you get log info into a file?

1 Answers  


What could be a data source system?

0 Answers  


How to reverse the string using unix?

0 Answers   CTS,


Categories