13 Aug, 2008
Creating and designing jobs with DataStage
Posted by: Anca Alimanescu In: Business Intelligence
Creating a job using the Design module. Here you have to define the source and the target of the job. This can be either a text file or an Oracle table. After choosing the source and the target, the job must be implemented and the unit tests executed.
Creating the job control. The job that has just been created should be integrated into a set of job and the moment of launchment should be established(after what job it starts). The job will be executed and the logs viewed with the help of the DataStage Director.
1. Job Design
In order to design a job there are a few steps to follow:
- Define the entering parameters
- Use stages like: databases, ODBC, sequential files, hashed files, folders, containers, transformer, aggregator, pivot, sort, link partitioner, link collector.
- Define the derivations(transforming functions)
- Execute the unit tests. In order to execute the unit tests, the definition of parameters is required, real time view of the number of lines treated as well as the end of the job(Error or Succes). This can be done using the Director module.The logs are not visible in the designer.
Frequent tasks when creating a job:
- Adding a Transformer item that can be based either on a formula, a filter or some variables.
- Adding a hashed file for creating and alimenting a table.
- Adding a lookup(database of hashed file ).
- Adding a OCI Oracle (query type/ sql overload)
Frequent transformations in a job:
- Alimenting a table using insert else update
- Aggregation
- Sort
- Removing duplicates
- Manage the rejects: generating one ore more rejects starting from a single line .
- Lookup for a big database table.
2. Job Control
The steps in executing a job are the following:
- define the entry parameters
- use the stages: Job Activity, Execute Command, Wait for file activity, Routine Activity, Sequencer, Terminator Activity, Exception Handler, StartLoop activity, EndLoop Activity.
- execute the unit test





