DataStage Interview Questions

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

    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........

    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...

    satish

    • Apr 2nd, 2015

    Use sort stage in sort cluster key change coloum true.
    then transformer stage create stage variable
    If DSLink5.keyChange=1 Then DSLink5.keyChange Else StageVar+1
    then map the sagevar to CountRow column

  •  

    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

    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

    Jithin

    • Sep 11th, 2014

    Do a full outer join between two files and from transformer draw three output links

    1st link-->wherever left side is null
    2nd link->wherever right side is null
    3rd link->wherever match is there

  •  

    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

    prabhu

    • Jun 26th, 2015

    Join two tables using join stage, join type = full outer join, then remove dup stage, then filter stage

    Nish

    • May 15th, 2015

    since the set 3,4 is common use a Change data capture stage and then filter according to the change_code column. Take file 1 in Before stage and file 2 in after stage. 1,2 are deleted and 3,4 are copi...

  •  

    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...

  •  

    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...

    Nish

    • May 24th, 2015

    This answer works but is not scalable. LastRow() is not available in DS 8.0. the best option in my opinion would be to write a BASIC server routine to return the maximum row number and then proceed to use it in XFMR constraints.

  •  

    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.

  •  

    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...

    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.

    D Hemakumar

    • Apr 24th, 2015

    Source---->columngenarator--------->transformer---->target
    generate the two columns col1 and col2 and generate the sequence numbers for both columns in transformer write constraint col1>col2
    take the source destination and distancefare columns in the output link

    i hope this may work

  •  

    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

  •  

    What is the architecture of your Datastage project

    I came across this question many times in interview, In specific what can i answer..... Please help..

    rstrainings

    • Apr 15th, 2015

    we can say like there is a staging area to store the data in the form of tables, and then it transforms to ETL stage (Here we will do all the conversions,remove duplicates,joining,merging etc) then di...

    shiv

    • Jun 11th, 2014

    The above answer, is to architecture of Datastage, its not the architecture of project. Project architecture would be like: ***************************** You have: 1 Source--------> 1 Staging Area----...

  •  

    What is the difference between Symetrically parallel processing,Massively parallel processing?

    Himanshu Maheshwari

    • Apr 2nd, 2015

    The environment in which you run your parallel jobs is defined by your system’s architecture and hardware resources. All parallel processing environments are categorized as one of: SMP (...

    Saurabh Sinha

    • Aug 1st, 2014

    In SMP every processor share a single copy of the operating system (OS)

    In MPP each processor use its own operating system (OS) and memory.

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