Help SQL Replication


< Previous | Next >

Lesson 3.1: Compiling and running the DataStage jobs

When you compile a DataStage® job, the Designer validates the design of the job by looking at inputs, expressions, transformations and other details. When the job compiles successfully, it is ready to run.

In this lesson you will compile all five jobs, but will only run the job sequence because this job controls the starting and completion of the four parallel jobs.

Procedure

  1. In the Designer repository tree, open the SQLREP folder to display the four parallel jobs and one job sequence.
  2. While holding down the Control (Ctrl) key, click each of the five jobs, and then right click and select Multiple job compile.
    Figure 1. Selecting Multiple job compile
    Selecting Multiple job compile

    The DataStage Compilation Wizard opens, with the five jobs already in the Selected items area.

    Figure 2. Compilation wizard with five jobs selected
    Compilation wizard
  3. Verify that all five jobs are selected, and click Next. Then on the Compile Process page of the wizard, click Start Compile.

    The wizard displays progress and then shows a status of "Compiled successfully."

    Figure 3. Compile Process page
    Compile Process page
  4. Start the DataStage and QualityStage™ Director by clicking Start > All programs > IBM Information Server > IBM WebSphere DataStage and QualityStage Director.
  5. In the project navigation pane on the left, click the SQLREP folder. This action brings all five jobs into the director status table.
  6. Click the STAGEDB_AQ00_S00_sequence job, and on the menu bar click Job > Run Now.
    Figure 4. Selecting Run Now to start job sequence
    Selecting Run Now

    After a few minutes, all five jobs should have a status of Finished. The Director also shows the elapsed time of each job.

    Figure 5. Status of jobs
    Window showing run finished

    You can look at the job log for more detail about the run by right-clicking the job sequence and clicking View > Log.

    Now that you have run all five jobs, you can check to see if the changed rows that are stored in the PRODUCT_CCD and INVENTORY_CCD tables were extracted by DataStage and inserted into the two data set files.

  7. Go back to the Designer and open the STAGEDB_ASN_PRODUCT_CCD_extract job. Double-click the insert_into_a_dataset icon to open the stage editor, and in the editor click View Data.
  8. Accept the defaults in the rows to be displayed window and click OK.

    A Data Browser window opens to show the contents of the data set file. Scroll to the left to see all of the data from the CCD table, which includes:

    • The before- and after-column images from the source table.
    • The extra columns that all CCD tables contain to show the log sequence numbers, SQL operation, and timestamp of row changes.
    Figure 6. Contents of data set file in Data Browser window
    Contents of data set file in Data Browser window

Lesson checkpoint

You have successfully compiled and run the DataStage jobs and verified that they work. In the next lesson you will make changes to the source table to demonstrate that the end-to-end integration of SQL Replication and DataStage is operating as designed.

< Previous | Next >



Send your feedback | Information roadmap | Replication group on My developerWorks



Update icon Last updated: 2011-10-21