Skip to main content
Transformation: Merge

Use the Merge transformation to combine selected columns into a single column with a custom delimiter, simplifying your dataset.

Quin Eddy avatar
Written by Quin Eddy
Updated this week

The Merge transformation in Nexadata Pipelines allows you to combine multiple columns into a single column, with options to define a delimiter, set a name for the new column, and choose whether to keep or remove the original columns. This transformation is useful for creating consolidated fields, such as full names, combined addresses, or other composite information. You can configure the transformation using Natural Language Mode or Advanced Mode, depending on the level of control required.


Inputs for the Merge Transformation

  1. Name of the Transformation: In Natural Language Mode, the transformation name is automatically generated, but you can update it later in Advanced Mode. For example, you might rename it to "Combine Address Fields" or "Merge First and Last Names".

  2. Columns to Merge: Select the columns you wish to combine into a single column. For example, you might choose "First_Name" and "Last_Name" to create a full name or "Street", "City", and "Postal_Code" to create a complete address field.

  3. Delimiter: Specify a delimiter to separate the merged values. Common delimiters include commas, spaces, hyphens, or slashes. For example, a space might be used to merge first and last names, while a comma might be used to merge city and postal code.

  4. New Column Name: Enter the name for the merged column. This should be a clear, descriptive name, such as "Full_Name" or "Complete_Address".

  5. Drop Original Columns: Enable this toggle if you want to remove the original columns after merging them. This is useful when you only need the merged column in the final output and want to declutter your dataset.


Using Natural Language Mode

In Natural Language Mode, you can describe the columns to merge and specify a delimiter, and Nexadata will configure the transformation accordingly. The transformation name is auto-generated but can be modified later in Advanced Mode.

Example Instructions in Natural Language Mode

  • Merge First_Name and Last_Name into a new column Full_Name with a space delimiter.

  • Combine Address, City, and Postal_Code into Complete_Address separated by commas.

  • Merge Product_Code and Serial_Number using a hyphen delimiter.

  • Create a Contact_Info column by merging Phone and Email with a slash.

  • Combine Street and ZipCode into Full_Address, and drop original columns.

Note: If Natural Language Mode doesn’t fully capture your requirements, you can switch to Advanced Mode for further adjustments.


Using Advanced Mode

In Advanced Mode, you have full control over the Merge transformation, allowing you to manually select columns, define a delimiter, and set the new column name. Advanced Mode allows for detailed control, ensuring the transformation precisely aligns with your analytical needs.

Steps in Advanced Mode

  1. Name of the Transformation: Enter or update a custom name for the transformation, such as "Merge Name Columns" or "Combine Address Components".

  2. Columns to Merge: Select the columns you want to merge, such as "First_Name" and "Last_Name", or "Street", "City", and "Postal_Code".

  3. Delimiter: Specify the delimiter to use for separating the merged values. Options include:

    • Space (for combining names or similar text fields)

    • Comma (for addresses or lists)

    • Hyphen (for codes or identifiers)

    • Slash or other custom delimiters as needed

  4. New Column Name: Enter the name for the merged column, such as "Full_Name" or "Complete_Address".

  5. Drop Original Columns: Enable this toggle if you want to remove the original columns from the dataset after merging.


Example Use Case

The Merge transformation is ideal for combining related columns into a single field for clarity. For example, if you have an address split into Street, City, and Postal_Code columns, you might want to merge them into a single Complete_Address column. For example:

  • Transformation Name: Merge Address Fields

  • Columns to Merge: Street, City, Postal_Code

  • Delimiter: Comma

  • New Column Name: Complete_Address

  • Drop Original Columns: Enabled

This configuration will combine Street, City, and Postal_Code into Complete_Address with a comma separator and remove the original columns from the dataset.


Summary

The Merge transformation in Nexadata Pipelines provides a flexible way to combine columns with customizable delimiters and options to drop the original columns. Use Natural Language Mode for a quick setup or Advanced Mode for more detailed control. This transformation is ideal for consolidating data and creating composite fields.

Did this answer your question?