Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r0681

D toc

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

Info

NOTE: 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.

    Info

    NOTE: 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:

        D lang syntax
        RawWrangletrue
        Typeref
        showNotetrue
        WrangleTextpivot value:any(myRating) group:postal_code limit: 1

        POW(myBaseVal,5)

        Info

        NOTE: 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:

        D lang syntax

        '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.

Tip

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

Use RapidTarget

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. 

Tip

Tip: 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 RapidTarget, which provides a visual interface for performing these remappings.

Info

NOTE: RapidTarget 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 RapidTarget.