DataStage FAQs

来源:互联网 发布:数组作为函数形参 编辑:程序博客网 时间:2024/06/04 00:57

http://todays-jobs.com/faqs/category/dwh/datastage/page/4/

Q) How do you pass the parameter tothe job sequence if the job is running atnight?
Two ways
1. Ste the default values of Parameters in the Job Sequencer andmap these parameters to job.
2. Run the job in the sequencer using datastage jobs utility wherewe can specify the values to be taken for each parameter.

Q) What is the transaction size andarray size in OCI stage? How these can beused?
Transaction Size - This field exists for backward compatibility,but it is ignored for release 3.0 and later of the Plug-in.

The transaction size for new jobs is now handled by Rows pertransaction on the Transaction Handling tab on the Input page.

Rows per transaction - The number of rows written before a commitis executed for the transaction. The default value is 0, that is,all the rows are written before being committed to the datatable.

Array Size - The number of rows written to or read from thedatabase at a time. The default value is 1, that is, each row iswritten in a separate statement.

Q) What is the difference between DRSand ODBC stage?
The DRS stage should be faster then the ODBC stage as it usesnative database connectivity. You will need to install andconfigure the required database clients on your DataStage serverfor it to work.
Dynamic Relational Stage was leveraged for Peoplesoft to have a jobto run on any of the supported databases. It supports ODBCconnections too. Read more of that in the plug-indocumentation.
ODBC uses the ODBC driver for a particular database, DRS is a stagethat tries to make it seamless for switching from one database toanother. It uses the native connectivities for the chosentarget.

Q) How do you track performancestatistics and enhance it?
Through Monitor we can view the performance statistics.

Q) What is the mean of Try to havethe constraints in the ‘Selection’ criteria of the jobs itself.This will eliminate the unnecessary records even getting in beforejoins are made?
This means try to improve the performance by avoiding use ofconstraints wherever possible and instead using them whileselecting the data itself using a where clause. This improvesperformance.

Q) My requirement is likethis:

Here is the codificationsuggested:

SALE_HEADER_XXXXX_YYYYMMDD.PSV
SALE_LINE_XXXXX_YYYYMMDD.PSV

XXXXX = LVM sequence to ensure unicity and continuity of fileexchanges
Caution, there will an increment to implement.
YYYYMMDD = LVM date of file creation

COMPRESSION AND DELIVERY TO:
SALE_HEADER_XXXXX_YYYYMMDD.ZIP AND
SALE_LINE_XXXXX_YYYYMMDD.ZIP

If we run that job the target file names are like this
sale_header_1_20060206 & sale_line_1_20060206.

If we run next time means the target files we like thissale_header_2_20060206 & sale_line_2_20060206.

If we run the same in next day means the target files we want likethis
sale_header_3_20060306 & sale_line_3_20060306.

i.e., whenever we run the same jobthe target files automatically changes its filename to
filename_increment to previous number (previousnumber +1)_currentdate;?

This can be done by using unix script

1. Keep A the Target filename as constant name xxx.psv

2. Once the job completed, invoke the Unix Script through after jobroutine - ExecSh

3. The script should get the number used in previous file andincrement it by 1, After that move the file from xxx.psv to

filename_(previousnumber + 1)_currentdate.psv and then delete thexxx.psv file. This is the A Easiest way to implement.

Q) How to drop the index beforeloading data in target and how to rebuild it in datastage?
This can be achieved by “Direct Load” option of SQLLoadedutility.

Q) What are the Jobparameters?
These Parameters are used to provide Administrative access andchange run time values of the job.

EDIT>JOBPARAMETERS

In that Parameters Tab we can define the name, prompt, type,value.

Q) There are three different types ofuser-created stages available for PX. What are they? Which wouldyou use? What are the disadvantage for using eachtype?
These are the three different stages:
i) Custom
ii) Build
iii) Wrapped

Q) How will you call externalfunction or subroutine from datastage?
There is datastage option to call external programs. execSH

0 0