DataStage Interview Questions

Showing Questions 1 - 20 of 664 Questions
First | Prev | Next | Last Page
Sort by: 
 | 
Jump to Page:
  •  

    Datastage Job Scenario question

    input file A contains12345678910input file B contains6789101112131415Output file X contains12345Output file y contains678910Output file z contains1112131415How can we do in this in a single ds job in px ?....could you please give me the logic to implement ???

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: vinod chowdary

    • Jul 27th, 2011


    Hello guy's, I would like to solve this by using the Change capture stage. First, i am going to 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. In the filter stage: keychange column=2 it goes to X [1,2,3,4,5] Keychange column=0 it goes to Y [6,7,8,9,10] Keychange column=1 it goes to Z [11,12,13,14,15] Revert me PLz

    Pavan Kumar

    • Jul 30th, 2015

    Using change capture stage:

    File1(Master),File2----> change capture---> Filter ---->
    T1, T2, T3
    In Filter,
    Change_code=1 then send then to T1-->(Insert records)
    Change_code=0 then send then to T2-->(Copy records)
    Change_code=2 then send then to T3-->(Delete records)

    sambit kumar rout

    • Jul 1st, 2015

    Use funnel stage to combine both the A and B source data. use RDC to remove delicacies in the result. Use transformer stage. Set @INROWNUM

  •  

    Multiple files and output

    I have two files target 3 files

    file no1:
    1
    2
    3
    4

    file2
    3
    4
    5
    6

    output like first file 1,2 first file 3,4 second file 5 ,6 3rd file target how to achieve this

    Amit

    • Jul 28th, 2015

    Basically Question is about how you will achive Left Join, Inner Join and Outer Join.

  •  

    Datastage job scenario question

    My input has a unique column-id with the values 10,20,30.....how can i get first record in one o/p file,last record in another o/p file and rest of the records in 3rd o/p file?

    Sam

    • May 27th, 2015

    Consider below points (Source is Flat File): 1] I will generate Row Number for each & every row through "Row Number Column" property 2] I will use Aggregator to find MIN & MAX Row Numbers by groupin...

  •  

    Flatfiles(.txt,.csv,xml) to laod sequential files?

    How can we load three different flat files(1 file .txt,2 file .csv,3 file xml) to sequential file at a time?

    Narra

    • Jul 21st, 2015

    Ready all the 3 source as a fixed width file. Otherwise it wont possiible untill unless having the same format

    Devesh Ojha

    • Aug 11th, 2014

    If Metadata is the same then we can load by doing the Union operation and if metadata is diffrent then first sync the metadata and then load them .

  •  

    What are Sequencers?

    Sequencers are job control programs that execute other jobs with preset Job parameters.    

    Star Read Best Answer

    Editorial / Best Answer

    jagannimmagadda  

    • Member Since Jan-2006 | Jan 10th, 2006


    A sequencer allows you to synchronize the control flow of multiple activities in a job sequence. It can have multiple input triggers as well as multiple output triggers.The sequencer operates in two modes:ALL mode. In this mode all of the inputs to the sequencer must be TRUE for any of the sequencer outputs to fire.ANY mode. In this mode, output triggers can be fired if any of the sequencer inputs are TRUE

    Rohit Soni

    • Jul 20th, 2015

    @Bimal Pradhan: You mean to say we cant run the 2nd job if 1st job is failed? What if I wanna run 2nd job if 1st job got failed out of 4 jobs.. plz reply

  •  

    How to remove reverse duplicates in datastage ?

    Scenario:
    Objective: The interface aims to consolidate the round-trip ticket cost of passengers.
    Description: The source file is a .txt file, train_route_src.txt, consolidated with trains from a particular source to destination. There are many repetitions in the source file (Reverse Duplication: eg. BLR --> BBS and BBS --> BLR). Remove the reverse duplicates and maintain the target in...

    sreeja

    • Jul 15th, 2015

    Source -> Sort -> filter > output
    We can have sort stage and set the property create key change column give it a name "KeyChange".Map this column to output link.
    Put a filter stage after sort satge and write a where condition KeyChange =1 and set output Reject =False

    Hope this will work

    Pavan Kumar

    • May 7th, 2015

    Source >> Pivot enterprise {(horizontal pivot) combine both source and destination} >> remove duplicate stage >> Pivot enterprise stage {(vertical pivote) group by fare and set array size to 2, this will split the data into two columns (source and destination column)} >> Dataset/ Fileset.

  •  

    Datastage Real time scenario

    source table
    name
    A
    A
    B
    B
    B
    C
    C
    D

    In source table data like this
    but I want traget table like this
    name count
    A 1
    A 2
    B 1
    B 2
    B 3
    C 1
    C 2
    D 1


    pls any one one solve this........

    Rajasekhar Reddy

    • Jul 13th, 2015

    By using Transformer....Create 3-Stage variable like Cur,Val,Pre after
    Stagevariable-1 >> Cur=InputColumn
    Stagevariable-2 >> Val If Cur=Pre then Val+1 Else 1
    Stagevariable-3 >>Pre=Cur
    Drag the Val into Derivation Part

    sambit kumar rout

    • Jul 1st, 2015

    Use a filter stage to direct the output of the sequential file to 4 links based on the value either A or B or C or D. At the end of every output link, use a transformer stage. Output the value of firs...

  •  

    Dataset stage and sequential file stage

    what is the difference between dataset stage and sequential file stage? even one more to be added here, What is the difference between dataset stage and fileset stage?

    sudha rani

    • Jun 25th, 2015

    In sequential stage we can run UNIX commands, but in data set we can not run UNIX commands In sequential file we can run remove and move commands, but in data set we can not run remove and move comma...

    jallu

    • May 25th, 2015

    The extension of dataset is .ds and it never used extract data from client location ,it is used as a intermediate stage b/w two tables
    sequential file it support all formats like .xls, csv ,txt etc,and it used to extract data from flat files from client location

  •  

    Giving occurances

    can anyone pls solve in datastage.........
    source column is..
    A
    A
    B
    B
    B
    C
    C
    D
    ........want output columns(2 cols) as.........
    A 1
    A 2
    B 1
    B 2
    B 3
    C 1
    C 2
    D 1

    THANX IN ADVANCE.

    Aparna

    • Jun 22nd, 2015

    Svar=> input column
    svar1=> If svar=svar2 Then svar1+1 Else 1
    Svar2=> svar
    Next populate input column and svar1 in target

    D Hemakumar

    • Apr 24th, 2015

    Take three stage variables in the transformer

    StageVar=inputcol
    StageVar1=Stagevar
    StageVar2=if StageVar=StageVar1 then StageVar2+1 else 1
    map the StageVar2 to the output link column

  •  

    Datastage real time scenario

    I have source like this

    a,b,c,1,2,3 ( All this in one column)

    I wanna target following below

    a,b,c,1 ( Ist row)
    a,b,c,2 (2nd row)
    a,b,c,3 (3rd row)

    Thanks in advance.

    Pankaj

    • Jun 17th, 2015

    This logic is far better................ great job.

    prasad

    • May 27th, 2015

    Take input as one columns and use field fun in transformer stage and divide string into columns after that do pivot stage then you will get output as above

    input columns->transformer stage(use filed function)->pivot stage

  •  

    DataStage Technical Questions

    1. Is the Hash file is active or passive? If we take as source ?2. can u take seq file as look up?3. In hash file dynamic 30, there r two types:1)genaric2)specific what is the meaning?4. how to connect MERGE STAGE while source as two tables?5. what is the purpose of MERGE?6. how can DS job scheduled in Unix?7. how do u know how many rows rejected?8. use of universe stage?9. what is SEQ file buffer?10. diff...

    jallu

    • Jun 3rd, 2015

    Scheduling the datastage jobs in unix using corntab utility (or) uc4

    jallu

    • Jun 3rd, 2015

    Merge stage combine two tables based on key column and its implemented two joins 1.innerjoin,2.leftouter join. merge stage can handle large volume of data and it need less memory, the data must be partitioned and sorted also it capture the rejected data from updated source.

  •  

    How to convert multiple rows into single row in datastage

    Hi,

    Can you please solve this in datastage..

    my input is
    name,city
    johnson,newyork
    johnson,mumbai
    johnson,delhi

    want output as
    name,city1,city2,city3
    johnson,newyork,mumbai,delhi

    pls explain with steps
    thanking in advance...

    santhosh

    • Jun 1st, 2015

    We can directly achieve this by using Pivot stage

    Sudip Barman

    • May 27th, 2015

    Hi Nish, You are correct. I missed RM dup stage. So the job design will be: Seq stg------>Sort stg-------->Trnsfrm stg1----->Renove Dup----->Trnsfrm stg2-------->Tgt 1. read data in seq file stag...

  •  

    Distribution of Number of rows equally.

    Hi all,
    I have 100 rows in a table and want to distribute the data by 4 equal parts and write to four sequential file. here the source data keeps changing. Example : if source data is having 1000 rows the target files have to get 250 rows each in the four files.
    1000/4 = 250 each
    100/4 =25 each

    jallu

    • May 27th, 2015

    Read the data from sequential file and pass the through sample stage and put the 4 targets ,in sample stage set the properties percentage mode=25% we can get require output

    Nish

    • May 25th, 2015

    source-> Transformer->Target. 4 targets from Transformer stage. Map the input to all the 4out put stages. now each link will have the following constraints respectively. Link1 :Mod(@INPUTROWNUM,4)=...

  •  

    Convert multiple rows into columns in datastage

    hi

    i have sourse like
    name,city
    johny,newyork
    johny,mumbai
    johny,del

    want output like
    name,city1,city2,city3
    johny,nework,mumbai,delhi

    thanks in advance..

    Nish

    • May 25th, 2015

    Pivot Enterprise stage is from 8.5 onwards. the generic solution would be to include a sort stage with key change column and then transformer stage with stage variables and field functions

    Ruchir

    • Apr 7th, 2015

    Use a vertical Pivot option available in Pivot Enterprise stage(Stage tab-->Properties-->Pivot Type=Vertical)

    Again in stage-->Pivot properties tab-->group by on Name column and Pivot using City column.

    Then select array size=3.

  •  

    Single column with multiple rows should be converted into single row with commas in datastage

    Can any one help....
    I have single column in Source like.....
    a
    b
    c
    d
    want target as.....
    a,b,c,d
    thanks in advance

    D Hema

    • Apr 23rd, 2015

    Use the stag variable in the transformer
    StageVar=StageVar:,: input column name
    go to the constraints :-Lastrow()
    map that stage variable to the output column

    jallu

    • Apr 11th, 2015

    By using pivot stage in datastage

  •  

    SRC records

    SRC has 1 record I want 10records in target how is it possible ? plz explain me ?

    Murali

    • Apr 19th, 2015

    Use the copy stage, between source and target.
    Take 10 nodes in the configuration file.
    Select "Partitioning methodology" as "Entire" in copy stage.
    You will 10 Output records.

    ramesh

    • Mar 25th, 2015

    Goto transformer stage ,in that stage select system variables ,select iteration and specify the condition in loopig is @iteration=10

  •  

    Single column with multiple rows should be converted into single row with commas

    Can any one help....
    Source is.....
    a
    b
    c
    d

    want target as.....
    a,b,c,d

    thanks in advance

    amulya kumar panda

    • Apr 17th, 2015

    add one extra column that value 1 or any thing but value same Use a vertical Pivot option available in Pivot Enterprise stage(Stage tab-->Properties-->Pivot Type=Vertical) Again in stage-->Pivot ...

    vasuu

    • Apr 13th, 2015

    Uses pivot stage or u can tx by stage variables

Showing Questions 1 - 20 of 664 Questions
First | Prev | Next | Last Page
Sort by: 
 | 
Jump to Page:

 

Have Interview Question?

Please select the most appropriate category and mention a brief question title along with clear question details.

Ask Question

Login to Ask Question or Register your free account   

Name:
Email:
Category :
Sub Category :
Question Title:
Question in Detail :
Job Role (Optional) :
Company (Optional) :
 

Optional Features

Register at GeekInterview

Register me.

Subscribe to GeekInterview Newsletter

Yes, Subscribe me to Interview & Career Tips