rename Transform

The rename transform renames a data field. Since the data is in the form of a Pandas DataFrame, this function renames a list of columns. If a renamed column has the same name as another column that already exists, then the existing column will be overwritten.

Example:

If we want to rename a column from Seattle Supersonics to Oklahoma City Thunder, our configuration will look something like this:

{
    "transform_name": "Moving cities",
    "transform_type": "rename",
    "renames": [
        {
            "from": "Seattle Supersonics",
            "to": "Oklahoma City Thunder"
        }
    ]
}

Configuration:

Required and optional properties that can be configured for a rename transform.

  • renames: A list of columns that should be renamed

    • from: The original column name

    • to: The new column name

  • transform_name: Unique name for the transform.

  • transform_type: Type of transform to apply. Should be rename.

  • filter_stream: List of data streams to transform. Each stream can either be * (all) or asset:stream.

Note:

Renames are evaluated in order, so renaming multiple columns to the same name will drop all except the last. Any missing ‘from’ columns will be ignored.