Sunday, June 29, 2008

Parellel Xtender Examples

Using Transformation Stages Part - 4

Task:
To create a job to extract the source from different stages, sort, join, transform and load in the target file.
Join stage – This stage joins the same two columns of different data. It also varies according to specified condition.
Steps for Job Design:
1. Open Data Stage Designer.
2. Drag the following stages from the palette to the parallel canvas and link the stages as shown below:
a) Dataset Stage (1)
b) DB2 Stage (1)
c) Sort Stage (1)
d) Join Stage (1)
e) Transformer Stage (1)
f) Copy Stage (2)
Job Design:


Parameterization:
1. Click on the Job Properties (Ctrl + J) and then click on the Parameters tab.
2. Type the following:
a) Parameter Name.
b) Prompt.
c) Type.
d) Default Type.

Extraction - 1:
Data Set Stage (UpdatedFinance):
1. Double Click on the Data Set Stage (UpdatedFinance).
2. Click Properties and then click on the property File. Browse for the location (can also be parameterized).
3. Click on the Columns tab and click the load button.
4. Select the Table definition (UpdatedFinance) from the category Dataset and click OK.

5. Click on View Data button.

6. Click OK.
Source - 2:
1. Double click on the DB Stage (Finance).
2. Enter the connection properties (Connection Name, User Id and Password) in the appropriate text boxes (passed through parameter).

3. Click the output tab and browse for the table finance.

4. Click on the Columns tab and then click on the Load button.
5. Select the appropriate Table definition (Finance) from DBMS and click OK.

6. Click on View Data button.

7. Click OK.
Transformation – 1:
Sort Stage (SortFinance):
1. Double click on the Sort Stage (SortFinance)
2. Click Properties tab and key in as shown below:

3. Click on the Output tab -> Mapping tab and map the columns as shown below:

Transformation – 2:
Copy Stage (RenamedFinance)
1. Double click on the Copy Stage and rename the existing column definition as shown below:

2. Click on the Output tab and then click on the Mapping tab.

3. Click OK.
Transformation – 3:
Join Stage (LOJFinance):
1. Double click on the Join Stage (LOJFinance).
2. Click on Properties tab and input as shown below:

3. Click on the Output tab and then map columns as shown below:

4. Click OK.
Transformation – 4:
Transformer Stage (AdjustLoanInfo):
1. Double click on the Transformer Stage.
2. Click on the Stage Properties icon and click on the Variables tab.
3. Key in the following the inputs:

4. Click OK.
5. Map the columns as shown below:

6. The derivations for:
"BALANCE" =
"NEXT_DUE_DATE" =
"STATUS" =
7. Click OK.
Output:

No comments:

Search 4 DataStage