I have 2 Files like
fileA fileB Output1 Output2 Output3
1 6 1 6 11
2 7 2 7 12
3 8 3 8 13
4 9 4 9 14
5 10 5 10 15
6 11
7 12
8 13
9 14
10 15

please let know

Answers were Sorted based on User's Feedback



I have 2 Files like fileA fileB Output1 Output2 Output3 1 6 1 6 11 2 7 2 7 12 3 8 3 8..

Answer / chethankumar

take 2sequential files 1 funnel 1 filter 3 targets
1)load the files to sequential files
2)join both the records using funnel
3)in filter go to input tab perform sort enable stable
and in where clause give condition if col<6 one target
col>5 and col<11 second, third col>10

Is This Answer Correct ?    10 Yes 1 No

I have 2 Files like fileA fileB Output1 Output2 Output3 1 6 1 6 11 2 7 2 7 12 3 8 3 8..

Answer / mohit

We can solve this by using Change capture stage. First,we
use source as 'A' and refrerence as 'B' both of them are
connected to Change capture stage. From, change capture
stage it connected to filter stage and then targets X,Y and
Z.
(Change Code '0'--->exist in both, copy record
Change Code '1'--->Exists in SRC 'A', INSERT record
Change Code '2'--->Exists in SRC 'B', DELETE record
Change Code '3'--->Exists in 'A' & 'B' with changes, UPDATE
record)

In the filter stage:
Change_code column=1 it goes to 'X' [1,2,3,4,5]
Change_code column=0 it goes to 'Y' [6,7,8,9,10]
Change_code column=2 it goes to 'Z' [11,12,13,14,15]

Is This Answer Correct ?    2 Yes 0 No

I have 2 Files like fileA fileB Output1 Output2 Output3 1 6 1 6 11 2 7 2 7 12 3 8 3 8..

Answer / vinod upputuri

You are right chetan, but in the second lookup we have to
use seq file 1 for main link and o/p2 is linked as reference.

Is This Answer Correct ?    0 Yes 0 No

I have 2 Files like fileA fileB Output1 Output2 Output3 1 6 1 6 11 2 7 2 7 12 3 8 3 8..

Answer / kanakam

hi guys for this scenario we need to do the following steps

1.First take the two sequential file stages
2.Use the Join stage,in join stage use the fullouter join
3.Take the Filter stage in filter stage we have to write
the where clause conditions:
a.for getting the Output1:Right.columnname=''
b.For gettting the output2:Right.columnname=left.columnname
c.for getting output3:Left.columnname=''

Is This Answer Correct ?    0 Yes 0 No

I have 2 Files like fileA fileB Output1 Output2 Output3 1 6 1 6 11 2 7 2 7 12 3 8 3 8..

Answer / radhika m

Add an extra column 'colA' and 'colB' to the files 'A' and 'B' respectively. Let the value for colsA be 'a' for all the rows in file 'A' and the value for colB be 'b' in file 'B'(using the column generator stage).Now join both the files using join stage using 'ID' column. Perform full outer join. Map the ID col, colA and colB to output. Next pass it through a transformer.

Transformer constraint:

1) file X - colA=a and colB<>b ----->[1,2,3,4,5]
2) file Y - colA=a and colB=b------->[6,7,8,9,10]
3) file Z - colA<>a and colB=b------>[11,12,13,14,15]

Drop cola and colB in the output.

Is This Answer Correct ?    0 Yes 0 No

I have 2 Files like fileA fileB Output1 Output2 Output3 1 6 1 6 11 2 7 2 7 12 3 8 3 8..

Answer / chaint

seqfile 1 --> Lookup on seq file 2 --> output2 -->
|
|
reject link(output1)


output 2--> lookup on seq file 2
|

reject link (output3)

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Data Stage Interview Questions

Explain datastage architecture?

0 Answers  


What are some different alternative commands associated with "dsjob"?

0 Answers  


What are the different database update actions available?

1 Answers   HP,


Hi, Please tell me how to solve this scenario in datastage ? Here we have 3 columns in a table TEST CODE,ENTRY DATE and BATCH The table looks like CODE ENTRYDATE BATCH 100 100716 1 100 100716 1 100 100716 1 200 122517 2 200 122517 2 302 555555 8 302 555555 8 302 555555 8 We need to create a seqno on grouping these 3 columns. The result should be like this. CODE ENTRYDATE BATCH SEQNO 100 100716 1 1 100 100716 1 2 100 100716 1 3 200 122517 2 1 200 122517 2 2 302 555555 8 1 302 555555 8 2 302 555555 8 3

1 Answers   Alpharithm Technologies,


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

13 Answers   Bank Of America, IBM,






1.what is repartionoing technique? 2.what deliverables transferred to client using datastage? 3.how to write loop statements using nested loop sequence?

0 Answers   IBM,


options available in sequence job to run,validate?

0 Answers   CTS,


How to display all the duplicate records from the oracle Table?

3 Answers   IBM,


im new to this tool im now at project plz tell me step by step process how to design plz help me i wnt to go with exp for job plz give me d proper design and explination

0 Answers  


If I make any changes in the parallel job,do I need to implement the changes in the sequencer job,else the changes will be reflected automatically

6 Answers   TCS,


What is confirmed Dimension? what is Factless Fact? give one example? What are Additive, Semi-Additive Facts?

1 Answers   TCS,


Is the value of staging variable stored temporarily or permanently?

0 Answers  


Categories