Skip to main content

Select

You can completely replace the columns in your dataset by selecting source columns, functions computed from the source, and constant values.

Nota

This transformation completely replaces the existing table, which could have significant effects on any downstream recipes or reference datasets that already exist.

Create Your Table

Steps:

  1. In the Transformer page, open the Recipe panel.

  2. In the recipe, locate the step where you wish to insert the transformation to create your new table.

    Nota

    If your Create Table transformation renames or omits columns, references to them later in your recipe or in other downstream objects may be broken.

  3. In the search bar, enter Select. Choose the transformation.

  4. In the Transform Builder, you can create the columns in order for your new table. For each column:

    1. In the upper field, enter the source of the column. The source can be one of the following:

      1. A column name in your source

      2. A function. Example:

        POW(myBaseVal,5)

        Nota

        When creating a table, aggregate and window functions are not supported. After you have created your table, you can apply these functions are normal.

      3. A constant value. Example:

        'valid'

    2. In the lower field, you enter a name for the column in the new table.

  5. To add a new column, click Add. Repeat the previous steps.

    1. You can remove columns, if needed. Click Remove next to the column entry.

  6. To create the new table when you've specified your columns, click Add.

The new table replaces your previous set of columns.

Suggerimento

After you have created your new table, you can disable or delete the step to revert to the previous state.

Use Target Schema Mapping

This transformation is added to your recipe when you perform column matching between your source dataset and a target schema. The results of your column matching work are rendered as a single Create Table transformation in your recipe.

Suggerimento

If you have a target schema to which you can assign to your recipe, you may find it easier to create your new table using target schema mapping, which provides a visual interface for performing these remappings.

Nota

Target schema mapping does not support inserting columns containing constants or generated by functions. You can insert those column as a later step.

For more information, see Overview of Target Schema Mapping.