Concatenate columns transform
The Concatenate transform allows you to build a new string column using the values of other columns with an optional spacer. For example, if we define a concatenated column “date” as the concatenation of “year”, “month” and “day” (in that order) with “-” as the spacer, we would get:
day | month | year | date |
---|---|---|---|
01 | 01 | 2020 | 2020-01-01 |
02 | 01 | 2020 | 2020-01-02 |
03 | 01 | 2020 | 2020-01-02 |
04 | 01 | 2020 | 2020-01-02 |
To add a Concatenate Columns transform:
-
Navigate to your visual ETL job in Amazon SageMaker Unified Studio.
-
Choose the plus icon to open the Add nodes menu.
-
Under Transforms, choose Concatenate Columns.
-
Select the diagram to add the node to your visual ETL job.
-
Select the node on the diagram to view details about the transform.
-
Under Concatenated column, enter the name of a new column that will be generated.
-
Under Columns, select the input columns.
-
(Optional) Under Spacer, enter a string to place between concatenated fields.
-
(Optional) Under Null value, enter the string to use when a column value is null.