DataStage Interview Questions

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

    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?

    Sourabh Kulkarni

    • Jan 22nd, 2023

    Deepak!, how to load a sequential file stage having data more than 2 Gb?

    ravikumar

    • Jul 24th, 2017

    1) Sequential file stage we can use UNIX commands and in dataset stage we cant use UNIX commands.
    2) Sequential file stage filename save as .txt and dataset - .ds

  •  

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

    Rams

    • Jul 10th, 2021

    Seqfile---Sort----Trans-seqfile
    Sort Stage---KeyChange column true
    Transfor- in advance tab set mode-Sequence
    Create one stage Variable: Stagevar= if KeyChangecol=1 then 1 else Stagevar+1
    Create on extracolumn in output give Stagevar=Newcolname

    Gabbar

    • Dec 8th, 2020

    You can solve this problem by using two way 1. using a transformer 2. using aggregator and transformer By using 1st method you can create 2 stage variable i.e Stagevar1 and Stagevar2 In StageVar1 wr...

  •  

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

    Ruchi Gautami

    • Dec 30th, 2019

    File -->> Sort -->> Transformer -->> O/P File Sort: Enable key column change as true. Transformer: Define one stage variable SVar if key_change =1 then city else SVar:,:city Define 3 columns Cit...

    Alisha

    • Aug 8th, 2019

    Can you please elaborate the Staging variable condition? how we define staging variable and how we are putting in conditon

  •  

    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?

    Prashant

    • Nov 25th, 2018

    If your output file is sequential file then you can you use filter property .

    Prashant

    • Nov 25th, 2018

    If the input has 2 partion then i would get 2 rows for lastrow() function. rest everyhing is correct

  •  

    Datastage partition

    Which partition followed by joiner,merge. lookup,remove duplicate

    lalit

    • Oct 9th, 2017

    For join, merge and remove duplicated you can use Hash partitioning and for lookup you can use entire partitioning
    Thank you

  •  

    How to seperate two diff datatypes and load it into two files?

    i have a source file1 consist of two datatypes

    file1:
    no(integer)
    1
    2
    3

    &

    dept(char)
    cs
    it
    ie

    and i want to seperate these two datatypes and load it into target files
    file2 & file3.

    how can i do this in datastage and by using which stage?

    lalit

    • Oct 10th, 2017

    So you can do it with transformer constraints like
    allnum(), alpha() like function and separate both datatypes in two different outputs

  •  

    Datastage Performance Tuning

    How to improve the Performance Tuning any 5 points

    Lalit

    • Oct 6th, 2017

    1)Set Proper configuration file
    2)Handle null and duplicate values properly
    3)Reduce number of transformers as much as possible
    4)Do not take more than 20 stages in a perticuler job
    5)Use Dataset stage instead of sequential file stage
    6)Use join merge and lookup stages properly

  •  

    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.

    lalit

    • Sep 12th, 2017

    Its really simple Take one sequential file which contains data a,b,c,1,2,3 ( First line column name=false) Then take one copy stage with three output link and then copy a,b,c,1 at one output link ...

    Ram

    • Mar 10th, 2016

    Hi Tulasi,
    This is for you..

    Src -->Trns (use Function Str(inputcolumn,@inputrow) --> Trg

    Thats all !

  •  

    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 28th, 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

    Priya Ranjan kumar

    • Aug 28th, 2017

    You can solve this question in easily way like.
    First use the funnel to take the input data from different sources and used check box for unique data(No duplicate data) then
    you can use transformer where you can apply logic like. @INROW

    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)

  •  

    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

    preeti

    • Aug 9th, 2017

    You can create a other array with some size and insert data in single array from double array for more see the following code for(int i=0;i

    Code
    1. class TestClass{
    2.           public static void main(String l[])
    3.           {
    4.                   int [][]a={{1},{2},{3},{4},{5}};
    5.                   int a1[]=new int[6];
    6.                   int k=0;
    7.                   for(int i=0;i<a.length;i++)
    8.                   {
    9.                           for(int j=0;j<a[i].length;j++)
    10.                           {
    11.                                  
    12.                                
    13.                                   a1[k]=a[i][j];
    14.                                   k++;
    15.                                 System.out.println(a[i][j]);
    16.                           }
    17.                          
    18.                   }
    19.                  
    20.          
    21.        
    22.  for(int i=0;i<a1.length;i++)
    23.  {
    24.         System.out.print(a1[i]);
    25.  }
    26.           }
    27.  
    28.  }

  •  

    DataStage - delete header and footer on the source sequential

    How do you you delete header and footer on the source sequential file and how do you create header and footer on target sequential file using datastage?

    Monisha jain

    • Jul 31st, 2017

    In sequential file using filter property where we can use UNIX command: sed -e 1d -e 1p

    sri

    • Mar 28th, 2017

    Use UNIX command in the sequential file stage
    sed -n1!p filename|sed -n $!p

  •  

    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

    Thwara

    • Jul 15th, 2017

    First copy the value from your seq. file using "copy stage", then use "funnel stage" to join the two seq. file, then sort them and use "remove duplicate stage" to find the duplicate values (eg: 3,4) t...

    Amit

    • Jul 28th, 2015

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

  •  

    How to Seperate Repetating & non-Repetating data.

    I have data in Table as

    ID
    1
    2
    3
    1
    4
    3
    3
    5
    6
    6
    7

    Now I want to have Output as repeatating records in one table & non-repeatating in another table

    Table 1 :
    Id
    2
    4
    5
    7

    Table 2:
    ID
    1
    1
    3
    3
    3
    6
    6

    anirudh

    • May 9th, 2017

    You can use sort->aggregrator->count_rows->transformer stage write constraints row_count>1 to one file and row_count>1 to another output file

    Neha

    • Apr 7th, 2017

    Seq File-> Aggregator (Count group by ID)->Transformer(Two output link , Use @Iteration1 and put @Iteration value in OpLnk2

  •  

    SCD Insert, Update and Link Data

    While implementing SCD, there are two output links updating data to same table. One link for insert and one link for update. How it is possible? Will it not result a write lock on a table if two links accessing same table for writing?

    Ammu

    • Mar 30th, 2017

    Thanks for the answer

    sri

    • Mar 27th, 2017

    Table level lock applies only when we explicitly define during table creation. In the case you mentioned to update and insert, there will be row level lock implies on that table. Logically, Insert re...

  •  

    Change Partition to Auto in Join stage

    What will happen if we will change the partition to Auto in Join stage?

    Huma

    • Feb 18th, 2017

    We usually go for join stage when the source input data is huge!!! If we select Hash partitioning only then it will improve the performance of job because Hash partitioning ensures that the data with ...

    Aloka

    • Jul 1st, 2016

    Thanks Suresh for your reply !
    But when Hash partition used..It will also verify for all the partition.
    It will be more helpful if you will elaborate more on this.

  •  

    Oracle Connector Stage and Oracle Enterprise Satge

    1. What is the difference between Oracle connector stage and Oracle enterprise stage.

    2. If we can achieve Oracle enterprise stages task using Oracle connector stage then why Oracle enterprise stage exists?

    Siva

    • Feb 3rd, 2017

    Oracle connector having test connection. Ie plugin which is not Present in the enterprise state

    vibgyss

    • Aug 24th, 2016

    2) Ans: min of 3 stage variables are required according to my view. example: if the source has two columns cid, address. we want to remove the duplicates in cid, our job design follows like below se...

  •  

    DATA Set Removed why

    Why we are using orchadmin to remove dataset. why we are not using rm commond in remove dataset..and why you need dataset remove waht is the reason?

    Reddy

    • Dec 19th, 2016

    Dataset is not like a normal file & it is not a single file...based on number og node in config file, those many data files and one descriptor file..are created for each dataset. Hence removing using rm command will corrupt the dataset and will not be removed properly.

  •  

    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

    Tariq Awan

    • Oct 25th, 2016

    As previous posts already pointed out, there are only two modes: All or Any. All means all incoming triggers must be true and Any means at least one needs to be true. However, in case, if you want to execute next job even though all the incoming triggers are False, then Seqencer is NOT the solution.

    Priyanka

    • Mar 10th, 2016

    @Rohit: Yes you can run the 2nd job even if the first one fails. For that you need to set the trigger option to unconditional. However, the control comes to the 2nd job only after the 1st job has run (pass or fail).

  •  

    Where do you use Link-Partitioner and Link-Collector ?

    Link Partitioner - Used for partitioning the data.Link Collector - Used for collecting the partitioned data.

    Star Read Best Answer

    Editorial / Best Answer

    nikhilanshuman  

    • Member Since Nov-2009 | Dec 17th, 2010


    Link Partitioner and collecter are basically used to introduce data parallellism in server jobs.link partitioner,splits the data on many links.Once the data is processed,link collector collects the data and passes it to a single link.These are used in server jobs.In datastage parallel jobs,these things are inbuilt and automatically taken care of.

    karthik

    • Aug 23rd, 2016

    Link Partition and Link collector are used in Server jobs for to split data.
    Partition technique can be done in server jobs by using these two stages.

  •  

    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.

    Amulya Kumar Panda

    • Jul 11th, 2016

    Job flow sequential_file-> eggregate->sort->tranformer-> sequential

    fast aggregate stage use count rows and add extra column seq_no
    next stage sort -key source column sort order ascending.
    tranformer stage use loop while ex-@ITERATION

    Kumar

    • Jul 8th, 2016

    Seq file>transformer>Seq file
    1.Mode of execution in transformer must be sequential and data must be sorted on col1
    2. Transformer logic:
    Stv1=Input column
    Stv2=if Stv1=Stv3 Then Stv2+1 Else 1
    Stv3=Stv1
    3.Output of transformer
    Col1,Col2
    Input column,Stv2

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