Datastage Interview questions

DataStage Interview Questions and Answers:

Q1. Define Data Stage?

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

Q2. Explain how a source file is populated?

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

Q3. Name the command line functions to import and export the DS jobs?

Ans: To import the DS jobs, dsimport.exe is used and to export the DS jobs, dsexport.exe is used.

Q4. What is the difference between Datastage 7.5 and 7.0?

Ans: In Datastage 7.5 many new stages are added for more robustness and smooth performance, such as Procedure Stage, Command Stage, Generate Report etc.

Q5. In Datastage, how you can fix the truncated data error?

Ans: The truncated data error can be fixed by using ENVIRONMENT VARIABLE ‘ IMPORT_REJECT_STRING_FIELD_OVERRUN’.

Q6. Define Merge?

Ans: Merge means to join two or more tables. The two tables are joined on the basis of Primary key columns in both the tables.

Q7. Differentiate between data file and descriptor file?

Ans: As the name implies, data files contains the data and the descriptor file contains the description/information about the data in the data files.

Q8. Differentiate between datastage and informatica?

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

Q9. Define Routines and their types?

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

Q10. How can you write parallel routines in datastage PX?

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

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

Ans: Duplicates can be removed by using Sort stage. We can use the option, as allow duplicate = false.

Q12. What steps should be taken to improve Datastage jobs?

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

Q13. Differentiate between Join, Merge and Lookup stage?

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

Q14. Explain Quality stage?

Ans: Quality stage is also known as Integrity stage. It assists in integrating different types of data from various sources.

Q15. Define Job control?

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

Q16. Differentiate between Symmetric Multiprocessing and Massive Parallel Processing?

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

Q17. What are the steps required to kill the job in Datastage?

Ans: To kill the job in Datasatge, we have to kill the respective processing ID.

Q18. Differentiate between validated and Compiled in the Datastage?

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

Q19. How to manage date conversion in Datastage?

Ans: We can use date conversion function for this purpose i.e. Oconv(Iconv(Filedname,”Existing Date Format”),”Another Date Format”).

Q20. Why do we use exception activity in Datastage?

Ans: All the stages after the exception activity in Datastage are executed in case of any unknown error occurs while executing the job sequencer.

Q21. Define APT_CONFIG in Datastage?

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

Q22. Name the different types of Lookups in Datastage?

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

Q23. How a server job can be converted to a parallel job?

Ans: We can convert a server job in to a parallel job by using IPC stage and Link Collector.

Q24. Define Repository tables in Datastage?

Ans: In Datastage, the Repository is another name for a data warehouse. It can be centralized as well as distributed.

Q25. Define OConv () and IConv () functions in Datastage?

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

Q26. Explain Usage Analysis in Datastage?

Ans: In Datastage, Usage Analysis is performed within few clicks. Launch Datastage Manager and right click the job. Then, select Usage Analysis and that’s it.

Q27. How do you find the number of rows in a sequential file?

Ans: To find rows in sequential file, we can use the System variable @INROWNUM.

Q28. Differentiate between Hash file and Sequential file?

Ans: 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 doesn’t have any key value to save the data. Basis on this hash key feature, searching in Hash file is faster than in sequential file.

Q29. How to clean the Datastage repository?

Ans: We can clean the Datastage repository by using the Clean Up Resources functionality in the Datastage Manager.

Q30. How a routine is called in Datastage job?

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

Q31. Differentiate between Operational Datastage (ODS) and Data warehouse?

Ans: We can say, ODS is a mini data warehouse. An ODS doesn’t contain information for more than 1 year while a data warehouse contains detailed information regarding the entire business.

Q32. NLS stands for what in Datastage?

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

Q33. Can you explain how could anyone drop the index before loading the data in target in Datastage?

Ans: In Datastage, we can drop the index before loading the data in target by using the Direct Load functionality of SQL Loaded Utility.

Q34. How can one implement the slowly changing dimensions in Datastage?

Ans: Slowly changing dimensions is not a concept related to Datastage. Datastage is used for ETL purpose and not for slowly changing dimensions.

Q35. How can one find bugs in job sequence?

Ans: We can find bugs in job sequence by using DataStage Director.

Q36. How complex jobs are implemented in Datstage to improve performance?

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

Q37. Name the third party tools that can be used in Datastage?

Ans: The third party tools that can be used in Datastage, are Autosys, TNG and Event Co-ordinator. I have worked with these tools and possess hands on experience of working with these third party tools.

Q38. Define Project in Datastage?

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

Q39. How many types of hash files are there?

Ans: 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 don’t know the amount of data from the source file.

Q40. Define Meta Stage?

Ans: In Datastage, MetaStage is used to save metadata that is helpful for data lineage and data analysis.

Q41. Have you have ever worked in UNIX environment and why it is useful in Datastage?

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

Q42. Differentiate between Datastage and Datastage TX?

Ans: Datastage is a tool from ETL (Extract, Transform and Load) and Datastage TX is a tool from EAI (Enterprise Application Integration).

Q43. What is size of a transaction and an array means in a Datastage?

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

Q44. How many types of views are there in a Datastage Director?

Ans: There are three types of views in a Datastage Director i.e. Job View, Log View and Status View.

Q45. Why we use surrogate key?

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

DataStage Interview Questions                 DataStage Interview Questions and Answers

Q46. How rejected rows are managed in Datastage?

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

Q47. Differentiate between ODBC and DRS stage?

Ans: DRS stage is faster than the ODBC stage because it uses native databases for connectivity.

Q48. Define Orabulk and BCP stages?

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

Q49. Define DS Designer?

Ans: The DS Designer is used to design work area and add various links to it.

Q50. Why do we use Link Partitioner and Link Collector in Datastage?

Ans: 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

Q51. 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 null-rows where data is expected.

Q52. If worked with DS6.0 and latest versions what are Link-Partitioner and Link-Collector used for?
Ans: Link Partitioner – Used for partitioning the data.
Link Collector – Used for collecting the partitioned data.

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

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

Q55. How did you connect to DB2 in your last project?
Ans:
Using DB2 ODBC drivers.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Q75. Read the String functions in DS
Ans:
Functions like [] -> sub-string function and ‘:’ -> concatenation operator
Syntax: string [ [ start, ] length ]
string [ delimiter, instance, repeats ]

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

Q77. What are Sequencers?
Ans:
Sequencers are job control programs that execute other jobs with preset Job parameters.

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

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

Q80. What versions of DS you worked with?
Ans:
DS 7.0.2/6.0/5.2

Q81. If worked with DS6.0 and latest versions what are Link-Partitioner and Link-Collector used for?
Ans:
Link Partitioner – Used for partitioning the data.Link Collector – Used for collecting the partitioned data.

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

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

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

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

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

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

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

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

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

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

Q92. How did you connect to DB2 in your last project?
Ans:
Using DB2 ODBC drivers.

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

Q94. What are Sequencers?
Ans:
Sequencers are job control programs that execute other jobs with preset Job parameters.

Q95. How do you execute Datastage job from command line prompt?
Ans:
Using “dsjob” command as follows. dsjob -run -jobstatus projectname jobname

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

contact for more on DataStage Online Training

DataStage Interview Questions Overall rating: ★★★★☆ 4.4 based on 427 reviews
5 1

datastage interview questions

Write A Review 

Name
Email
Review Title
Rating
Review Content

Datastage interview questions Tags

Datastage interview questions and answers,Datastage online training, Datastage interview questions, Datastage training online, Datastage training, Datastage training institute, latest Datastage interview questions, best Datastage interview questions 2019, top 100 Datastage interview questions,sample Datastage interview questions,Datastage interview questions technical, best Datastage interview tips, best Datastage interview basics, Datastage Interview techniques,Datastage Interview Tips.

For  online training videos