ETLMCPData Conveyance Works
Log in Start free
Docs

Rows in, rows out and the range: reading a run

What rows in, rows out and the date range on a run mean, why a CSV run delivers more rows than it pulled, and why a failed run shows 0 out.

Every run reports two counts. Rows in is how many rows the ad platform returned for the run's dates, counted the moment they arrive, before etlmcp reads, checks or stores any of them. Rows out is how many rows the destination received after the pipeline's rules were applied. They measure different things, so a gap between them is expected. The range is the span of days the run actually pulled.

You see the counts in three places: the Runs log has a Rows in and a Rows out column, the pipeline list shows the last run's rows out under the heading Rows delivered, and the rows_in and rows_out fields come back from Get a run in the REST API and from the get_run tool over MCP.

Why rows out can be far above rows in

  • CSV export. Each run writes a file with the source's whole stored history, run through the rules, not just the days this run fetched. A daily run that pulled a few hundred rows can report tens of thousands out, and that number grows as the stored history grows. See the CSV destination.
  • PostgreSQL and webhooks. These receive only the rows for the run's dates. Here rows out is normally the stored rows for the range, and a Filter, Group by or Limit rule makes it smaller.

One exception applies to PostgreSQL. If your rules drop the date column, rows without a date replace everything the pipeline wrote before, so etlmcp sends the rules' result over the whole stored history instead of only the range. Rows out then reflects the history. How PostgreSQL rows are replaced covers this.

Why rows out can be below rows in

Apart from rules, two things shrink the count between the platform and your destination:

  • A platform sometimes returns rows for days outside the range it was asked for. Those rows count in rows in but are neither stored nor delivered.
  • Rows etlmcp cannot read make the run fail rather than pass with a smaller set, so on a real connector unreadable rows do not quietly lower rows out.

Failed and partial runs show 0 out

A run that ends as failed or partial keeps the rows in it counted and records 0 rows out. That is true even when a webhook had already accepted some batches before a later one failed: the error then says earlier batches were delivered, but rows out still reads 0. In the pipeline list, Rows delivered shows a number only for success and partial runs and a dash otherwise. Run statuses explains each status.

The error field on a queued run

A run that goes back to queued after an attempt keeps a note in its error field, in the REST API and in get_run, saying why it is waiting:

Text in error What it means
retrying: {…} The attempt hit a failure that can pass and will be tried again; the rest names the cause. See retries.
retrying: the server restarted The worker stopped before delivery began and handed the run back to the queue.
waiting for other large syncs to end The run would deliver a large history while other such syncs hold the room. See large-history deferral.

This text is not a failure. A successful finish clears it, and the Runs page shows an error only on failed and partial runs.

Reading the range

The Runs log shows each run's range as a start and an end day. When the platform serves no data before a certain day and the run asked for earlier ones, etlmcp moves the start up to that first day before it fetches, and records the new start on the run. The range you read is therefore the days actually pulled, not the days requested. If the whole requested range lies before that first day, the run fails instead.

Related