"Merge columns" node

This node allows you to create a new column based on the values from other columns and to define the separator between the merged values.

Node configuration


  1. Click Add rule.
  2. Select one of the options:
    • Include these - the default; it allows you to select the columns for merging.
    • Include all except these - in this option, you can select the columns which you do NOT want to merge. All the other columns will be merged.
  3. Click Add column.
  4. From the dropdown list, select the columns to be merged.
  5. In the New column name field, enter the name of the column that will be added as a result of merging the selected columns.
  6. In the Separator field, enter the character which will function as a separator among values of the columns that are being merged.
  7. Optionally, you can delete the original columns by enabling the Remove original columns option on.
  8. You can check the preview of the file after changes in the Output data tab.
  9. To define what happens if rows contain errors, select one of the options available in the Error handling section.
  10. Confirm the settings by clicking Apply.

Handle errors

You can define what to do with failed values (for example, as a result of Jinja rendering or in other cases) in cells where data type modification failed. In the Error handling section, select one of the following options:

  • Skip row if error occurred - It omits the row when an exception occurs.
  • Skip if result is null or empty string - It omits rows with empty strings and null (which may be the result of rendering Jinja)
  • Stop further transformation - The transformation stops at the row with an error. The data before the line that caused the error is transformed (and imported if the transformation rule is used in the Data Transformation node).
  • Insert null if error occurred - Wrong values are replaced with null. If you use such a transformation for the import of profiles, the existing value of an attribute is cleared and replaced with the null value.
  • Insert empty string if error occurred - Wrong value is removed and the cell remains empty.

Example of use


You can use the Merge columns node in order to create an event salt. Event salt allows you to avoid duplicating an entry in the database if it is imported more than once. It is especially useful while importing events to Synerise.

File sample used in the Data Input node

customId,orderId,paymentInfo,finalUnitPriceAmount,productQuantity,sku,eventTimestamp,productName,productPriceAmount
123345,448362,cash,13.35,1,642,13.02.2022,shoe1,13.35
123345,448362,cash,40,1,453,13.02.2022,shoe2,40
345678,45678990,online,13.99,1,726,13.02.2022,shoe3,13.99

  1. As the first node, add Data Input.
  2. In the configuration of the node, upload a file on which you want to perform data transformation.
  3. As the next node, add a Merge Columns node.
  4. In the configuration of the node:
    • merge the orderId and eventTimestamp columns together,
    • enter eventSalt as the name of the new column,
    • set - as a separator.
    Configuration of the Merge columns node
    Configuration of the Merge columns node
  5. Leave the rest of the settings at default.
  6. As the last node, add Data Output.
    Result: You receive a data file with a new eventSalt column.
😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker