Edilitics | Data to Decisions

Merge Columns

Combine two or more columns into a single string column using a delimiter. Configure multiple merge rules in one operation while preserving source columns.

Merge Columns combines two or more columns into a single new string column using a separator you choose. Every value in the selected columns is cast to string, joined with the delimiter, and stored in a new column you name. The source columns are unchanged.

You can configure multiple merge rules in one operation, each producing a different output column.


When to Use Merge Columns

  • Full name column. Combine first_name and last_name into a single full_name field for CRM exports or display.
  • Composite identifier. Join region, product_id, and year into a single key for joins or reporting.
  • Formatted address. Merge street, city, state, and zip into one address column for downstream systems.
  • Transaction label. Combine transaction_type, account_number, and date into a readable audit log column.
  • Unique lookup key. Create a customer_product_key by merging two identifiers before a lookup join.

Sample Dataset

The examples in this doc use the Edilitics sample orders dataset. Download it to follow along in your own workspace.

edilitics_sample_orders.csv

Sample orders dataset for hands-on practice · 500 rows

Download

Relevant columns for Merge Columns examples:

Prop

Type


Delimiters

The delimiter is the character inserted between values when columns are joined.

OptionCharacterExample output
Space John Smith
Tab\tJohn Smith
Pipe|John|Smith
Hyphen-John-Smith
Underscore_John_Smith
Customanytype your own

The Delimiter dropdown is a creatable select. Select one of the five options or type any character or string to use it as a custom delimiter.


How to Apply Merge Columns

Open the Merge Columns operation

In your Transform pipeline, click Add Operation and select Merge Columns from the operation list.

Select columns to merge

In the Select Columns to Merge section, choose the columns to combine. The first two column slots appear by default. Click Add Column to add more input columns to this merge rule.

You can remove a column slot by clicking its remove icon. A minimum of two columns is required.

All column types are supported. Non-string columns are automatically cast to string before joining.

Select a delimiter

Choose the separator from the Select a Delimiter dropdown. Options: Space, Tab, Pipe, Hyphen, Underscore. To use a custom separator, type it directly into the dropdown.

Name the output column

Type a name in the New Column Name field. The name must:

  • Contain only letters, numbers, and underscores
  • Not start with __ or a number
  • Not already exist in the dataset or in another merge rule configured in this operation

Click Done

Click Done to add this merge rule to the list above the configuration panel. The output column name is now reserved and cannot be reused in another rule.

To configure another merge, click Add Merge Rule and repeat the steps above.

Save the operation

Click Save & Preview. Edilitics applies all merge rules and adds the new columns to the dataset. A success toast confirms: "Columns merged. Preview updated with the new composite column."

Save & Preview is disabled until at least one merge rule has been submitted with Done.

Verify in the preview

Check the new column in the preview. Confirm the delimiter is correct and that values from all source columns appear in the expected order.


Before and After

Two merge rules configured in one operation:

  1. first_name + last_name with Space delimiter = full_name
  2. region + order_id with Hyphen delimiter = region_order_key

Input:

first_namelast_nameregionorder_id
JaneLeeEast1001
MarcoSilvaWest1002

Output:

first_namelast_nameregionorder_idfull_nameregion_order_key
JaneLeeEast1001Jane LeeEast-1001
MarcoSilvaWest1002Marco SilvaWest-1002

Source columns unchanged. Two new string columns added.


Code Equivalent

SELECT
  *,
  first_name || ' ' || last_name           AS full_name,
  region || '-' || CAST(order_id AS TEXT)  AS region_order_key
FROM orders;
import polars as pl

df = df.with_columns([
    pl.concat_str([pl.col("first_name"), pl.col("last_name")], separator=" ").alias("full_name"),
    pl.concat_str([pl.col("region"), pl.col("order_id").cast(pl.String)], separator="-").alias("region_order_key"),
])

After Save & Preview, the pipeline shows a DQ delta badge on this step - green if the table score improved, red if it dropped. See Data Quality Scoring for how scores are calculated.


After Save & Preview, the pipeline shows a DQ delta badge on this step - green if the table score improved, red if it dropped. See Data Quality Scoring for how scores are calculated.


Operation Reference

Prop

Type


Frequently Asked Questions


Next Steps

Need help? Email support@edilitics.com with your workspace, job ID, and context. We reply within one business day.

Last updated on

On this page