Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

what is diff b/w datastage 8.1,8.5,8.7?

1 Answers   IBM,


If seg file having 10 records ex:eid 1 2 " " 10 if oracle database having 100 records ex:eid 1 2 " " 100 how to delete matched records permenently from oracle database using datastage ?

5 Answers   Infotech,


Source have 1000 records and it can have three nodes ok but i want how many records are executed on each node?

3 Answers   TCS,


parallel jobs run on cluster machines. server jobs run on smp and mpp. What do mean by cluster mechines and SMP and MPP..?

3 Answers  


What is a merge in datastage?

0 Answers  


What is the method of removing duplicates, without the remove duplicate stage?

0 Answers  


how to get the unique records on multiple columns by using sequential file stage only

3 Answers  


Question 4) source target c1 c1 c2 c3 c2 c4 c4 c5 c3 c6 c7 c4 c5 c6 c7 Singal Source and Singal Target only subash,

3 Answers   TCS,


input like 2 7 8 9 5 1 7 3 6 output:2 5 6 how to find out this plz explain?

2 Answers   HSBC,


I have a source like file it have Number of records and i want to load without first and last records in target?Datastage?

4 Answers   CSC,


What is quality stage?

0 Answers  


diff between changecapture & diffrence stage which situvation we can use the diffrence stage ?

1 Answers   TCS,


Categories