21 Ibm Websphere Datastage Interview Questions A Answers
21 Ibm Websphere Datastage Interview Questions A Answers
1. How do you rename all of the jobs to support your new File-naming conventions?
A: 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.
2. 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.
A: 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).
3. Tell me one situation from your last project, where you had faced problem and How did u solve it?
A: 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.
1/9
5. How will you determine the sequence of jobs to load into data warehouse?
A: First we execute the jobs that load the data into Dimension tables, then Fact tables, then load the Aggregator tables (if any).
6. What are the command line functions that import and export the DS jobs?
A: A. dsimport.exe- imports the DataStage components. B. dsexport.exe- exports the DataStage components.
7. What is the utility you use to schedule the jobs on a UNIX server other than using Ascential Director?
A: Use crontab utility along with dsexecute() function along with proper parameters passed.
supported by DataStage?
A: 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.
9. 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.
A: 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.
3/9
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.
14. What are other Performance tunings you have done in your last project to increase the performance of slowly running jobs?
A: 1. Staged the data coming from ODBC/OCI/DB2UDB stages or any database on the server using Hash/Sequential files for optimum performance also for data recovery in case job aborts. 2. Tuned the OCI stage for 'Array Size' and 'Rows per Transaction' numerical values for faster inserts, updates and selects. 3. Tuned the 'Project Tunables' in Administrator for better performance. 4. Used sorted data for Aggregator. 5. Sorted the data as much as possible in DB and reduced the use of DS-Sort for better performance of jobs 6. Removed the data not used from the source as early as possible in the job. 7. Worked with DB-admin to create appropriate Indexes on tables for better performance of DS
4/9
queries 8. Converted some of the complex joins/business in DS to Stored Procedures on DS for faster execution of the jobs. 9. If an input file has an excessive number of rows and can be split-up then use standard logic to run jobs in parallel. 10. Before writing a routine or a transform, make sure that there is not the functionality required in one of the standard routines supplied in the sdk or ds utilities categories. Constraints are generally CPU intensive and take a significant amount of time to process. This may be the case if the constraint calls routines or external macros but if it is inline code then the overhead will be minimal. 11. Try to have the constraints in the 'Selection' criteria of the jobs itself. This will eliminate the unnecessary records even getting in before joins are made. 12. Tuning should occur on a job-by-job basis. 13. Use the power of DBMS. 14. Try not to use a sort stage when you can use an ORDER BY clause in the database. 15. Using a constraint to filter a record set is much slower than performing a SELECT WHERE. 16. Make every attempt to use the bulk loader for your particular database. Bulk loaders are generally faster than using ODBC or OLE.
16. If worked with DS6.0 and latest versions what are Link-Partitioner and Link-Collector used for?
5/9
A: Link Partitioner - Used for partitioning the data. Link Collector - Used for collecting the partitioned data.
17. What are Routines and where/how are they written and have you written any routines before?
A: 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
18. What are OConv () and Iconv () functions and where are they used?
A: IConv() - Converts a string to an internal storage format OConv() - Converts an expression to an output format.
6/9
7/9
28. What are Static Hash files and Dynamic Hash files?
A: 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.
like DS 5.X, if so tell us some the steps you have taken in doing so?
A: Yes. The following are some of the steps; I have taken in doing so: 1) Definitely take a back up of the whole project(s) by exporting the project as a .dsx file 2) See that you are using the same parent folder for the new version also for your old jobs using the hard-coded file path to work. 3) After installing the new version import the old project(s) and you have to compile them all again. You can use 'Compile All' tool for this. 4) Make sure that all your DB DSN's are created with the same name as old one's. This step is for moving DS from one machine to another. 5) In case if you are just upgrading your DB from Oracle 8i to Oracle 9i there is tool on DS CD that can do this for you. 6) Do not stop the 6.0 server before the upgrade, version 7.0 install process collects project information during the upgrade. There is NO rework (recompilation of existing jobs/routines) needed after the upgrade.
31. Did you Parameterize the job or hard-coded the values in the jobs?
A: Always parameterized the job. Either the values are coming from Job Properties or from a Parameter Manager a third part tool. There is no way you will hardcode some parameters in your jobs. The often Parameterized variables in a job are: DB DSN name, username, password, dates W.R.T for the data to be looked against at.
9/9