Adding a Transformation to an Existing Job

Problem

You want to add a transformation to an existing process flow diagram in a SAS Data Integration Studio job. This transformation adds new functionality to the job. However, you need to add the transformation without disturbing the existing mapping and propagation settings of the current components of the job.

Solution

You can follow a standard process for adding transformations to jobs. This process includes the following tasks:

Tasks

Prepare the Job

Perform the following tasks before you add a transformation to the Diagram tab for an existing job:
  1. Disable the Automatically Propagate Job item. Access this item by clicking the Settings button in the toolbar. This action prevents the automatic propagation feature from changing all columns in all transformations. You can restore the propagation settings to the job as a part of the configuration task that is covered at the end of this topic.
  2. Delete the arrow between the objects that you need to separate with the added transformation.
    The following display shows the connecting arrow between the source table and the Splitter transformation selected for deletion:
    Selected Arrow Connection
    Selected Arrow Connection
This job uses the Splitter transformation to generate separate lists of male and female employees from a table that contains employee data.

Add the Transformation

Now you can add a transformation to the Diagram tab and connect it to the objects that surround it in the job.
The following display shows a job that was updated with a Sort transformation between a source table and a Splitter transformation:
Job with Added Transformation
Job With Added Transformation
The Sort transformation is used to sort the data by weight before it is processed by the Splitter transformation.

Configure and Run the Updated Job

Perform the following configuration steps before you run the updated job:
  1. Click Control Flow in the Details pane to place the transformations in the proper order.
    The following display shows the uncorrected transformation order:
    Uncorrected Transformation Order
    Uncorrected Transformation Order
  2. Reorder the transformations so that the newly added Sort transformation comes before the Splitter transformation. This action makes the control flow order match the order that is displayed in the job flow on the Diagram tab.
  3. Open the properties window of the Sort transformation. Then, specify the sort criteria on the Sort By Columns tab. For example, you can specify an ascending sort on the Weight column.
  4. Right-click the Sort transformation and select the Propagate Columns item in the pop-up menu. Set the propagation flow to From Selected Transformation’s Sources and To Targets.
  5. Open the properties window of the Splitter transformation that was in the original job. Then, check the settings on the Mapping tab. If necessary, click Map all columns to map between the added Sort transformation and the original Splitter transformation.
Now you can run the job and check the output.
The following display shows the output of the job:
Job Output for Males, Sorted by Weight
Job Output For Male Employees, Sorted By Weight
As expected, the data from the source table has been sorted by weight and split into separate tables for male and female employees. The Sort transformation has been successfully added to the job flow.