Grouping related data from selected columns into a single column

Use the Pivot data transformer to group related data from selected columns in the source table, which are called pivot columns, into a single column, called a pivot group column, in the target table. You can create more than one pivot group column.

Before you begin this task, a source table must exist in the warehouse database. The Pivot Data transformer creates a target table in the same warehouse database that contains the source.

You can make changes to the step definition only when the step is in Development mode.

../byb.gif Authorities and privileges

../rule.gif

To define a Pivot Table transformer:

  1. Open the step notebook.

  2. Specify information for your step:

  3. Click the Parameters tab.

  4. Optional: in the Available columns list, click the column that you want to carry over to the target table without making any changes. Then, click the > button next to the Carry-over columns list. To select multiple columns, press Ctrl while you click columns.

  1. In the Available columns list, click the columns that you want to use as pivot columns. Then, click the > button next to the Pivot columns list.

  2. In the Number of pivot groups field, type the number of pivot groups that you want to create. The number of groups that you type must be a divisor of the number of pivot columns that you selected. For example, if you selected 6 pivot columns, you can type the number 1, 2, 3, or 6. If you selected 5 pivot columns, you can type 1 or 5 in this field.

  3. If you selected pivot columns, specify the data group and pivot groups for each pivot column.

  4. If you want to include an ordered column of numbers in the output table, select Include sequence column in output.

  5. On the Column Mapping page, map the output columns that result from the transformation that you defined on the Parameters page to columns on your target table. On this page, output columns from the Parameters page are referred to as source columns. Source columns are listed on the left side of the page. Target columns from the output table linked to the step are listed on the right side of the page. Use the Column Mapping page to perform the following tasks:

    If the Parameters page produces no output columns, or if this step is not linked to a target table and you have not specified automatic generation of a default table in the Parameters page, you will not be able to use this page to map your columns. Some steps will not allow you to change the column mapping.

  6. On the Processing Options page, in the Agent Site list, select an agent site where you want your step to run. The selections in this list are agent sites that are common to the source tables, the target table, and the transformer or program that you are defining.

  7. If you want to have the option to to run your step at any time, select the Run on demand checkbox. Your step must be in test or production mode before you can run it.

  8. Optional: Select the Populate externally check box if the step is populated externally, meaning that it is invoked in some way other than by the Data Warehouse Center. The step does not have to have any other means of running in the Data Warehouse Center in order to change the mode to production.

    If Populate externally is not selected, then the step must either have a schedule, be linked to a transient table that is input to another step, or be started by another program in order to change the mode to production.

  9. In the Retry area, specify how many times you want the step to run again if it needs to be retried and the amount of time that you want to pass before the next run of the step.

  10. In the Log table field, specify a log table.

  11. Optional: In the Trace level field, specify a trace level.

  12. Click OK to save your changes and close the step notebook.

Related information

Moving and transforming data

Population type descriptions

List of steps and step subtypes

Data Warehouse Center concepts