ETLMCPData Conveyance Works
Log in Start free
Docs

Changing a pipeline's rules, source or destination after it has delivered

What a CSV export, a PostgreSQL table and a webhook receive after you edit a pipeline's rules or move it to another source or destination.

Editing a pipeline's rules changes only what later runs deliver. etlmcp stores each row exactly as the platform sent it and applies your rules at delivery time, to the stored rows. What you see after an edit depends on the destination: a CSV export shows the new rules on every day at the next run, while a PostgreSQL table or a webhook receiver keeps the old shape on every day the next run does not cover. The same holds when you point a pipeline at another source or destination: nothing is copied or rewritten for you.

Why the stored rows never change

A run fetches rows from the platform, saves them unchanged, then reads them back, applies the pipeline's rules and hands the result to the destination. Renaming cost to spend, adding a Derive rule or grouping by campaign changes only the rows built for the next delivery, never what etlmcp keeps. See how rules work.

What each destination shows after an edit

Destination What one run delivers After you edit the rules
CSV export The source's whole stored history Every day in the next file uses the new rules
PostgreSQL Only the run's date range Days in that range use the new rules; other days keep the old result
Webhook Only the run's date range Your receiver gets new-shape rows for that range only

A CSV file is rebuilt from everything stored for the source on every run, so an edit shows up across all of history at once.

A PostgreSQL run deletes and rewrites this pipeline's rows for its own dates only. Days outside that range keep what the earlier rules, or the earlier source, produced. To bring them in line, start a backfill over them. A sync started by hand can cover at most 366 days and must fall within the days your plan keeps, so a long history may take several backfills.

A webhook receives only the rows for the run's range. etlmcp cannot change what your receiver already stored, so updating older days is up to your receiving system, or to a backfill that sends them again.

Rules that remove the date

If your rules leave rows without a date column, for example Group by campaign_name alone, the PostgreSQL table has no day to replace by. Each PostgreSQL run then replaces all of this pipeline's rows, built from the source's whole stored history, so totals stay complete. A webhook still receives only the run's range in that case.

New columns in an existing PostgreSQL table

When the table already exists, etlmcp adds new extra.* columns by itself, provided the database user you gave etlmcp is allowed to alter the table. Any other column that a new rule produces, such as the target of a Rename on a platform column, a Derive column or a Set column, is not added for you. The run fails at delivery and ends as partial, with a message like this:

table {schema}.{table} is missing columns: {listed}{suffix}

To fix it, add the columns to the table yourself, with a suitable type, or give the destination a new table name so etlmcp creates a fresh table with the new shape. See PostgreSQL errors.

Switching the source or the destination

Changing a pipeline's source or destination copies nothing. The old destination keeps whatever it already received. The new destination gets only what runs deliver from now on, so backfill it if you need history there. In a PostgreSQL table, rows from the old source stay on every day that no run has covered since the switch; a backfill over those days replaces them with the new source's rows.

Deleting and re-creating is not an edit

Deleting a pipeline removes its stored CSV files, but it does not touch your PostgreSQL table. Every row etlmcp writes carries the pipeline's id in the _etlmcp_pipeline_id column, and runs only ever delete rows carrying their own pipeline's id. A new pipeline gets a new id, so the old pipeline's rows stay in the table beside the new ones, and sums over the table count both. Delete the old rows yourself, filtering on the old _etlmcp_pipeline_id, or edit the existing pipeline instead of re-creating it. Row replacement in PostgreSQL explains the column in detail.

Related