Data Stage Interview Questions

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 13

1) Define Data Stage?

A data stage is basically a tool that is used to design, develop and execute various applications to fill multiple tables in data warehouse or data marts. It is a program for Windows servers that extracts data from databases and change them into data warehouses. It has become an essential part of IBM WebSphere Data Integration suite. 2) Explain how a source file is populated? We can populate a source file in many ways such as by creating a SQL query in Oracle, or by using row generator extract tool etc. 3) Name the command line functions to import and export the DS jobs? To import the DS jobs, dsimport.exe is used and to export the DS jobs, dsexport.exe is used. 4) What is the difference between Datastage 7.5 and 7.0? In Datastage 7.5 many new stages are added for more robustness and smooth performance, such as Procedure Stage, Command Stage, Generate Report etc. 5) In Datastage, how you can fix the truncated data error? The truncated data error can be fixed by using ENVIRONMENT VARIABLE IMPORT_REJECT_STRING_FIELD_OVERRUN. 6) Define Merge? Merge means to join two or more tables. The two tables are joined on the basis of Primary key columns in both the tables. 7) Differentiate between data file and descriptor file? As the name implies, data files contains the data and the descriptor file contains the description/information about the data in the data files. 8) Differentiate between datastage and informatica? Datastage In datastage, there is a concept of partition, parallelism for node configuration. While, there is no concept of partition and parallelism in informatica for node configuration. Also, Informatica is more scalable than Datastage. Datastage is more user-friendly as compared to Informatica.

9) Define Routines and their types? Routines are basically collection of functions that is defined by DS manager. It can be called via transformer stage. There are three types of routines such as, parallel routines, main frame routines and server routines. 10) How can you write parallel routines in datastage PX? We can write parallel routines in C or C++ compiler. Such routines are also created in DS manager and can be called from transformer stage. 11) What is the method of removing duplicates, without the remove duplicate stage? Duplicates can be removed by using Sort stage. We can use the option, as allow duplicate = false. 12) What steps should be taken to improve Datastage jobs? In order to improve performance of Datastage jobs, we have to first establish the baselines. Secondly, we should not use only one flow for performance testing. Thirdly, we should work in increment. Then, we should evaluate data skews. Then we should isolate and solve the problems, one by one. After that, we should distribute the file systems to remove bottlenecks, if any. Also, we should not include RDBMS in start of testing phase. Last but not the least, we should understand and assess the available tuning knobs. 13) Differentiate between Join, Merge and Lookup stage? All the three concepts are different from each other in the way they use the memory storage, compare input requirements and how they treat various records. Join and Merge needs less memory as compared to the Lookup stage. 14) Explain Quality stage? Quality stage is also known as Integrity stage. It assists in integrating different types of data from various sources. 15) Define Job control? Job control can be best performed by using Job Control Language (JCL). This tool is used to execute multiple jobs simultaneously, without using any kind of loop. 16) Differentiate between Symmetric Multiprocessing and Massive Parallel Processing?

In Symmetric Multiprocessing, the hardware resources are shared by processor. The processor has one operating system and it communicates through shared memory. While in Massive Parallel processing, the processor access the hardware resources exclusively. This type of processing is also known as Shared Nothing, since nothing is shared in this. It is faster than the Symmetric Multiprocessing. 17) What are the steps required to kill the job in Datastage? To kill the job in Datasatge, we have to kill the respective processing ID. 18) Differentiate between validated and Compiled in the Datastage? In Datastage, validating a job means, executing a job. While validating, the Datastage engine verifies whether all the required properties are provided or not. In other case, while compiling a job, the Datastage engine verifies that whether all the given properties are valid or not. 19) How to manage date conversion in Datastage? We can use date conversion function for this purpose i.e. Oconv(Iconv(Filedname,Existing Date Format),Another Date Format). 20) Why do we use exception activity in Datastage? All the stages after the exception activity in Datastage are executed in case of any unknown error occurs while executing the job sequencer. 21) Define APT_CONFIG in Datastage? It is the environment variable that is used to identify the *.apt file in Datastage. It is also used to store the node information, disk storage information and scratch information. 22) Name the different types of Lookups in Datastage? There are two types of Lookups in Datastage i.e. Normal lkp and Sparse lkp. In Normal lkp, the data is saved in the memory first and then the lookup is performed. In Sparse lkp, the data is directly saved in the database. Therefore, the Sparse lkp is faster than the Normal lkp. 23) How a server job can be converted to a parallel job? We can convert a server job in to a parallel job by using IPC stage and Link Collector. 24) Define Repository tables in Datastage?

In Datastage, the Repository is another name for a data warehouse. It can be centralized as well as distributed. 25) Define OConv () and IConv () functions in Datastage? In Datastage, OConv () and IConv() functions are used to convert formats from one format to another i.e. conversions of roman numbers, time, date, radix, numeral ASCII etc. IConv () is basically used to convert formats for system to understand. While, OConv () is used to convert formats for users to understand. 26) Explain Usage Analysis in Datastage? In Datastage, Usage Analysis is performed within few clicks. Launch Datastage Manager and right click the job. Then, select Usage Analysis and thats it. 27) How do you find the number of rows in a sequential file? To find rows in sequential file, we can use the System variable @INROWNUM. 28) Differentiate between Hash file and Sequential file? The only difference between the Hash file and Sequential file is that the Hash file saves data on hash algorithm and on a hash key value, while sequential file doesnt have any key value to save the data. Basis on this hash key feature, searching in Hash file is faster than in sequential file. 29) How to clean the Datastage repository? We can clean the Datastage repository by using the Clean Up Resources functionality in the Datastage Manager. 30) How a routine is called in Datastage job? In Datastage, routines are of two types i.e. Before Sub Routines and After Sub Routines. We can call a routine from the transformer stage in Datastage. 31) Differentiate between Operational Datastage (ODS) and Data warehouse? We can say, ODS is a mini data warehouse. An ODS doesnt contain information for more than 1 year while a data warehouse contains detailed information regarding the entire business. 32) NLS stands for what in Datastage?

NLS means National Language Support. It can be used to incorporate other languages such as French, German, and Spanish etc. in the data, required for processing by data warehouse. These languages have same scripts as English language. 33) Can you explain how could anyone drop the index before loading the data in target in Datastage? In Datastage, we can drop the index before loading the data in target by using the Direct Load functionality of SQL Loaded Utility. 34) How can one implement the slowly changing dimensions in Datastage? Slowly changing dimensions is not a concept related to Datastage. Datastage is used for ETL purpose and not for slowly changing dimensions. 35) How can one find bugs in job sequence? We can find bugs in job sequence by using DataStage Director. 36) How complex jobs are implemented in Datstage to improve performance? In order to improve performance in Datastage, it is recommended, not to use more than 20 stages in every job. If you need to use more than 20 stages then it is better to use another job for those stages. 37) Name the third party tools that can be used in Datastage? The third party tools that can be used in Datastage, are Autosys, TNG and Event Coordinator. I have worked with these tools and possess hands on experience of working with these third party tools. 38) Define Project in Datastage? Whenever we launch the Datastage client, we are asked to connect to a Datastage project. A Datastage project contains Datastage jobs, built-in components and Datastage Designer or User-Defined components. 39) How many types of hash files are there? There are two types of hash files in DataStage i.e. Static Hash File and Dynamic Hash File. The static hash file is used when limited amount of data is to be loaded in the target database. The dynamic hash file is used when we dont know the amount of data from the source file. 40) Define Meta Stage?

In Datastage, MetaStage is used to save metadata that is helpful for data lineage and data analysis. 41) Have you have ever worked in UNIX environment and why it is useful in Datastage? Yes, I have worked in UNIX environment. This knowledge is useful in Datastage because sometimes one has to write UNIX programs such as batch programs to invoke batch processing etc. 42) Differentiate between Datastage and Datastage TX? Datastage is a tool from ETL (Extract, Transform and Load) and Datastage TX is a tool from EAI (Enterprise Application Integration). 43) What is size of a transaction and an array means in a Datastage? Transaction size means the number of row written before committing the records in a table. An array size means the number of rows written/read to or from the table respectively. 44) How many types of views are there in a Datastage Director? There are three types of views in a Datastage Director i.e. Job View, Log View and Status View. 45) Why we use surrogate key? In Datastage, we use Surrogate Key instead of unique key. Surrogate key is mostly used for retrieving data faster. It uses Index to perform the retrieval operation. 46) How rejected rows are managed in Datastage? In the Datastage, the rejected rows are managed through constraints in transformer. We can either place the rejected rows in the properties of a transformer or we can create a temporary storage for rejected rows with the help of REJECTED command. 47) Differentiate between ODBC and DRS stage? DRS stage is faster than the ODBC stage because it uses native databases for connectivity. 48) Define Orabulk and BCP stages?

Orabulk stage is used to load large amount of data in one target table of Oracle database. The BCP stage is used to load large amount of data in one target table of Microsoft SQL Server. 49) Define DS Designer? The DS Designer is used to design work area and add various links to it. 50) Why do we use Link Partitioner and Link Collector in Datastage? In Datastage, Link Partitioner is used to divide data into different parts through certain partitioning methods. Link Collector is used to gather data from various partitions/segments to a single data and save it in the target table.

More questions How did you handle reject data? Ans: Typically a Reject-link is defined and the rejected data is loaded back into data warehouse. So Reject link has to be defined every Output link you wish to collect rejected data. Rejected data is typically bad data like duplicates of Primary keys or nullrows where data is expected. If worked with DS6.0 and latest versions what are Link-Partitioner and LinkCollector used for? Ans: Link Partitioner - Used for partitioning the data. Link Collector - Used for collecting the partitioned data. What are Routines and where/how are they written and have you written any routines before? Ans: Routines are stored in the Routines branch of the DataStage Repository, where you can create, view or edit. The following are different types of routines: 1) Transform functions 2) Before-after job subroutines 3) Job Control routines What are OConv () and Iconv () functions and where are they used? Ans: IConv() - Converts a string to an internal storage format OConv() - Converts an expression to an output format. How did you connect to DB2 in your last project? Ans: Using DB2 ODBC drivers.

Explain METASTAGE? Ans: MetaStage is used to handle the Metadata which will be very useful for data lineage and data analysis later on. Meta Data defines the type of data we are handling. This Data Definitions are stored in repository and can be accessed with the use of MetaStage. Do you know about INTEGRITY/QUALITY stage? Ans: Qulaity Stage can be integrated with DataStage, In Quality Stage we have many stages like investigate, match, survivorship like that so that we can do the Quality related works and we can integrate with datastage we need Quality stage plugin to achieve the task. Explain the differences between Oracle8i/9i? Ans: Oracle 8i does not support pseudo column sysdate but 9i supports Oracle 8i we can create 256 columns in a table but in 9i we can upto 1000 columns(fields) How do you merge two files in DS? Ans: Either use Copy command as a Before-job subroutine if the metadata of the 2 files are same or create a job to concatenate the 2 files into one if the metadata is different. What is DS Designer used for? Ans: You use the Designer to build jobs by creating a visual design that models the flow and transformation of data from the data source through to the target warehouse. The Designer graphical interface lets you select stage icons, drop them onto the Designer work area, and add links. What is DS Administrator used for? Ans: The Administrator enables you to set up DataStage users, control the purging of the Repository, and, if National Language Support (NLS) is enabled, install and manage maps and locales. What is DS Director used for? Ans: datastage director is used to run the jobs and validate the jobs. we can go to datastage director from datastage designer it self. What is DS Manager used for? Ans: The Manager is a graphical tool that enables you to view and manage the contents of the DataStage Repository What are Static Hash files and Dynamic Hash files? Ans: As the names itself suggest what they mean. In general we use Type-30 dynamic Hash files. The Data file has a default size of 2Gb and the overflow file is used if the data exceeds the 2GB size. What is Hash file stage and what is it used for?

Ans: Used for Look-ups. It is like a reference table. It is also used in-place of ODBC, OCI tables for better performance. How are the Dimension tables designed? Ans: Find where data for this dimension are located. Figure out how to extract this data. Determine how to maintain changes to this dimension. Change fact table and DW population routines.

Does the selection of 'Clear the table and Insert rows' in the ODBC stage send a Truncate statement to the DB or does it do some kind of Delete logic. Ans: There is no TRUNCATE on ODBC stages. It is Clear table blah blah and that is a delete from statement. On an OCI stage such as Oracle, you do have both Clear and Truncate options. They are radically different in permissions (Truncate requires you to have alter table permissions where Delete doesn't). Tell me one situation from your last project, where you had faced problem and How did you solve it? Ans: The jobs in which data is read directly from OCI stages are running extremely slow. I had to stage the data before sending to the transformer to make the jobs run faster. B. The job aborts in the middle of loading some 500,000 rows. Have an option either cleaning/deleting the loaded data and then run the fixed job or run the job again from the row the job has aborted. To make sure the load is proper we opted the former. Why do we have to load the dimensional tables first, then fact tables: Ans: As we load the dimensional tables the keys (primary) are generated and these keys (primary) are Foreign keys in Fact tables. How will you determine the sequence of jobs to load into data warehouse? Ans: First we execute the jobs that load the data into Dimension tables, then Fact tables, then load the Aggregator tables (if any). What are the command line functions that import and export the DS jobs? Ans: A. dsimport.exe- imports the DataStage components. B. dsexport.exe- exports the DataStage components. What is the utility you use to schedule the jobs on a UNIX server other than using Ascential Director? Ans: Use crontab utility along with dsexecute() function along with proper parameters passed. How would call an external Java function which are not supported by DataStage? Ans: Starting from DS 6.0 we have the ability to call external Java functions using a Java package from Ascential. In this case we can even use the command line to invoke the

Java function and write the return values from the Java program (if any) and use that files as a source in DataStage job. What will you in a situation where somebody wants to send you a file and use that file as an input or reference and then run job. Ans: A. Under Windows: Use the 'WaitForFileActivity' under the Sequencers and then run the job. May be you can schedule the sequencer around the time the file is expected to arrive. B. Under UNIX: Poll for the file. Once the file has start the job or sequencer depending on the file. Read the String functions in DS Ans: Functions like [] -> sub-string function and ':' -> concatenation operator Syntax: string [ [ start, ] length ] string [ delimiter, instance, repeats ] How did you connect with DB2 in your last project? Ans: Most of the times the data was sent to us in the form of flat files. The data is dumped and sent to us. In some cases were we need to connect to DB2 for look-ups as an instance then we used ODBC drivers to connect to DB2 (or) DB2-UDB depending the situation and availability. Certainly DB2-UDB is better in terms of performance as you know the native drivers are always better than ODBC drivers. 'iSeries Access ODBC Driver 9.00.02.02' - ODBC drivers to connect to AS400/DB2. What are Sequencers? Ans: Sequencers are job control programs that execute other jobs with preset Job parameters. Differentiate Primary Key and Partition Key? Ans: Primary Key is a combination of unique and not null. It can be a collection of key values called as composite primary key. Partition Key is a just a part of Primary Key How did you handle an 'Aborted' sequencer? Ans: In almost all cases we have to delete the data inserted by this from DB manually and fix the job and then run the job again. What versions of DS you worked with? Ans: DS 7.0.2/6.0/5.2 If worked with DS6.0 and latest versions what are Link-Partitioner and LinkCollector used for? Ans: Link Partitioner - Used for partitioning the data.Link Collector - Used for collecting the partitioned data. How do you rename all of the jobs to support your new File-naming conventions? Ans: Create a Excel spreadsheet with new and old names. Export the whole project as a

dsx. Write a Perl program, which can do a simple rename of the strings looking up the Excel file. Explain the types of Parallel Processing? Ans: Parallel Processing is broadly classified into 2 types. a) SMP - Symmetrical Multi Processing. b) MPP - Massive Parallel Processing. Does the selection of 'Clear the table and Insert rows' in the ODBC stage send a Truncate statement to the DB or does it do some kind of Delete logic. Ans: There is no TRUNCATE on ODBC stages. It is Clear table blah blah and that is a delete from statement. On an OCI stage such as Oracle, you do have both Clear and Truncate options. When should we use ODS? Ans: DWH's are typically read only, batch updated on a scheduleODS's are maintained in more real time, trickle fed constantly What is the default cache size? How do you change the cache size if needed? Ans: Default cache size is 256 MB. We can incraese it by going into Datastage Administrator and selecting the Tunable Tab and specify the cache size over there. What are the types of Parallel Processing? Ans: Parallel Processing is broadly classified into 2 types. a) SMP - Symmetrical Multi Processing. b) MPP - Massive Parallel Processing. How to handle Date convertions in Datastage ? Convert a mm/dd/yyyy format to yyyy-dd-mm? Ans: We use a) "Iconv" function - Internal Convertion. b) "Oconv" function - External Convertion. Function to convert mm/dd/yyyy format to yyyy-dd-mm is Oconv(Iconv(Filedname,"D/M Differentiate Primary Key and Partition Key? Ans: Primary Key is a combination of unique and not null. It can be a collection of key values called as composite primary key. Partition Key is a just a part of Primary Key. Is it possible to calculate a hash total for an EBCDIC file and have the hash total stored as EBCDIC using Datastage ? Ans: Currently, the total is converted to ASCII, even tho the individual records are stored as EBCDIC. How do you merge two files in DS? Ans: Either used Copy command as a Before-job subroutine if the metadata of the 2 files are same or created a job to concatenate the 2 files into one if the metadata is different. How did you connect to DB2 in your last project? Ans: Using DB2 ODBC drivers.

What is the default cache size? How do you change the cache size if needed? Ans: Default cache size is 256 MB. We can incraese it by going into Datastage Administrator and selecting the Tunable Tab and specify the cache size over there. What are Sequencers? Ans: Sequencers are job control programs that execute other jobs with preset Job parameters. How do you execute Datastage job from command line prompt? Ans: Using "dsjob" command as follows. dsjob -run -jobstatus projectname jobname How do you rename all of the jobs to support your new File-naming conventions? Ans: Create a Excel spreadsheet with new and old names. Export the whole project as a dsx. Write a Perl program, which can do a simple rename of the strings looking up the Excel file. Then import the new dsx file probably into a new project for testing. Recompile all jobs. Be cautious that the name of the jobs has also been changed in your job control jobs or Sequencer jobs. So you have to make the necessary changes to these Sequencers.

You might also like