The Postgres table etlmcp creates has no column that records when a row arrived, so a dashboard cannot show "data updated at" from it as delivered. You can add one yourself: a loaded_at column with DEFAULT now(). etlmcp leaves the column alone, PostgreSQL fills it on every row etlmcp inserts, and max(loaded_at) for a pipeline then tells you when that pipeline last delivered data. A BI tool's own refresh time cannot tell you this, because it only says when the tool last read the table.
What the table holds today
When etlmcp creates the table, it makes one column for each delivered field plus a text column named _etlmcp_pipeline_id, which says which pipeline wrote the row. Nothing else is added: no load time, no run id. etlmcp checks that _etlmcp_pipeline_id is present before each load and refuses a table without it, but it does not object to other columns you add. See the pipeline id column for how several pipelines share one table.
Add the column
Run this as the table's owner. PostgreSQL only lets the owner alter a table, and the owner is the login you gave etlmcp, because that login created it.
ALTER TABLE public.ad_performance
ADD COLUMN loaded_at timestamptz DEFAULT now();
Replace public.ad_performance with your schema and table. According to the PostgreSQL docs, a default that is not volatile, such as now(), is worked out once when the statement runs and kept in the table's metadata. The table is not rewritten, so the change is quick even on a large table, and every row already there reads back the time of the ALTER. Do not use clock_timestamp() as the default: it is volatile, and PostgreSQL then rewrites the whole table and its indexes.
Why every new row gets the default
etlmcp's INSERT lists the columns it delivers and _etlmcp_pipeline_id, nothing more. PostgreSQL fills any column left out of an insert's column list with its declared default, so each row etlmcp writes gets now() in loaded_at without any change on the etlmcp side.
now() returns the time the current transaction started, as a timestamp with time zone, and it stays the same for the whole transaction. A run deletes the pipeline's rows in the run's date window and inserts the new ones inside one transaction, committed only at the end. So all the rows from one run carry the same loaded_at. That time is when the load's transaction began, a little before the commit makes the rows visible. If a run fails before the commit, the connection closes and PostgreSQL rolls the transaction back: the old rows stay, with their old times.
Query the last delivery
SELECT _etlmcp_pipeline_id, max(loaded_at) AS last_loaded
FROM public.ad_performance
GROUP BY _etlmcp_pipeline_id
ORDER BY last_loaded;
The oldest value at the top is the pipeline most likely to have stalled. When you read it:
- A run replaces only the days in its window. Older days keep the time of the run that last re-pulled them, so
loaded_atdiffers from day to day within one pipeline. Usemax, not the value on an arbitrary row. - A run with no rows to deliver inserts nothing, so it never moves
max(loaded_at)forward. If the table has adatecolumn, such a run still deletes that pipeline's rows inside its window. - Only a successful load shows up. A run that failed or never started leaves the last value as it was, which is what you want for spotting a stall.
To label a dashboard, put max(loaded_at) in a small view or a scorecard, filtered on the pipeline the chart uses. Reporting views shows how to build views over the table.
Without changing the table
If you cannot alter the table, use the REST API. List pipelines returns each pipeline's last_run_at and last_status, set when a run ends, whatever its result. List runs returns recent runs with each run's status and finished_at, newest first, and can be narrowed to one pipeline. A check that looks for a last_status other than success, or a last_run_at older than a day, catches a stalled pipeline across every client without opening the app.