In this example, you will define a data station operator
that stores the results of a join operator into a regular table.
Before you begin- Create a table named EMP_EXPENSE_RANKING in the GOSALESDW schema
of the GSDB database. This table is used as a regular staging table
in the example. Define the following columns in the regular staging
table:
- MONTH_KEY
- ORGANIZATION_KEY
- EXPENSE_TYPE_KEY
- ACCOUNT_KEY
- EXPENSE_PLAN_TOTAL
- POSITION_KEY
- EMPLOYEE_KEY
- DAY_KEY
- EMPLOYEE_RANKING_KEY
- RANKING_CODE
- Create a EMP_EXPENSE_RANKING_POSITION target table having the
following columns and define the ORGANIZATION_KEY column as the primary
key:
- MONTH_KEY
- ORGANIZATION_KEY
- EXPENSE_TYPE_KEY
- ACCOUNT_KEY
- EXPENSE_PLAN_TOTAL
- POSITION_KEY
- EMPLOYEE_KEY
- DAY_KEY
- EMPLOYEE_RANKING_KEY
- RANKING_CODE
- POSITION_COUNT
- PLANNED_POSITION_COUNT
- INTERNAL_HIRES
- EXTERNAL_HIRES
- TERMINATIONS
About this exampleIn this example, the data station
operator stores the result of the join between EMP_EXPENSE_PLAN_FACT
and EMP_RANKING_FACT tables into a regular table EMP_EXPENSE_RANKING.
The results of the join are joined with the EMP_POSITION_SUMMARY_FACT
table and the final result is loaded into the EMP_EXPENSE_RANKING_POSITION
table.
ProcedureTo create this data flow:
- Create a data flow that integrates data from three source
tables: EMP_EXPENSE_PLAN_FACT, EMP_RANKING_FACT, and EMP_POSITION_SUMMARY_FACT
and loads the final result into the EMP_EXPENSE_RANKING_POSITION target
table as shown in the following figure:
- In the flow that you created, define the data station operator
to either stage the data in a regular table or stage the data in a
file:
| Option |
Description |
| Stage the data in a regular table |
- Click the General tab in the Properties
view for the data station operator.
- In the Station Type list, select REGULAR
TABLE as the staging object.
- Click the ellipsis button (...) next to
the Staged database table field, and select
the table EMP_EXPENSE_RANKING. After the regular staging table is
selected, the Table Name field displays EMP_EXPENSE_RANKING
and the Schema Name field displays GOSALESDW.
- Retain the default settings of the other options on the General
page.
|
| Stage the data in a file |
- Click the File Format page of the Properties view for the data
station operator.
- In the Field delimiter list, select <TAB> from
the list. This setting causes adjacent columns to be separated by
a tab character.
- In the String delimiter list, select " from
the list. This setting causes adjacent strings to be separated by
double quotation marks.
|
- Save and validate the flow.