In a PostgreSQL table that etlmcp fills, every platform extra is a column whose name contains a dot, such as extra.sessions. Write it in double quotes: SELECT "extra.sessions". Without the quotes, PostgreSQL reads extra.sessions as the column sessions of a table called extra, and the query fails. The standard columns, such as date, cost or campaign_name, need no quotes.
Why the dot breaks an unquoted name
PostgreSQL's lexical rules let a plain, unquoted name hold letters, digits, underscores and dollar signs, and nothing else. A dot is the separator between schema, table and column, so it can never sit inside an unquoted name. A name in double quotes can hold any character except the zero byte, dots and spaces included.
etlmcp keeps the dot on purpose. Rows arrive with a set of standard fields and an extra group for whatever a platform reports beyond them. When the rows are written to a table, each extra becomes its own column named extra. plus the extra's key, and new extras add columns as they first appear. A GA4 pipeline gives you extra.sessions, extra.engaged_sessions, extra.key_events, extra.revenue and more. A Meta pipeline gives you one column per action type, such as extra.actions.lead, with its value next to it in extra.action_values.lead. etlmcp creates and changes the table with every column name quoted, so the name in the table is exactly that dotted text.
Writing the query
The table has the standard columns first, in this order: date, network, account_id, account_name, campaign_id, campaign_name, adgroup_id, adgroup_name, ad_id, ad_name, impressions, clicks, cost, conversions, conversion_value, ctr, cpc, cpm, cpa and currency. Then come the extras the first load carried, then _etlmcp_pipeline_id, the column that marks which pipeline wrote each row. Extras that appear in later loads are added at the end, after it. Because the order can differ between tables, name your columns in SELECT rather than relying on SELECT *. The table sits in the schema you chose, or public by default.
SELECT date,
campaign_name,
"extra.sessions" AS sessions,
"extra.engaged_sessions" AS engaged_sessions,
"extra.revenue" AS revenue
FROM public.ga4_daily
WHERE date >= DATE '2026-11-01'
ORDER BY date, campaign_name;
Quote the whole name as one piece. "extra"."sessions" and extra."sessions" both still mean a table called extra, and fail the same way. Give each quoted column a plain alias, as above, so a BI tool or a later query can use sessions without quotes.
Two rules from PostgreSQL apply to quoted names:
- Case counts inside quotes. An unquoted name is folded to lower case before it is looked up; a quoted one is matched exactly.
"Extra.Sessions"is not"extra.sessions". Copy the name as the table shows it. - Standard columns can go either way. They are all lower case, so
costand"cost"find the same column.
Long extra names get a hash
PostgreSQL uses at most 63 bytes of a name and silently cuts the rest, so two long names that share a beginning would land on the same column. When an extra's full name, extra. included, is longer than PostgreSQL keeps, etlmcp writes a shorter name instead: the start of the full name, an underscore, and the first characters of a SHA-256 hash of the full name. The same extra always gets the same shortened name, and the hash makes it very unlikely that two different extras share one. Standard columns are never shortened.
Long names come mostly from Meta action types. To find the exact column name, read it from the catalog rather than guessing it:
SELECT column_name
FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = 'meta_daily'
AND column_name LIKE 'extra.%'
ORDER BY column_name;
The same columns in BigQuery
The BigQuery destination is coming. When it is available, it names the same columns differently. BigQuery column names may hold only letters, digits and underscores and must start with a letter or an underscore; its flexible column names allow spaces but still not dots. So etlmcp turns every character outside letters, digits and underscores into an underscore: extra.sessions becomes extra_sessions, and extra.actions.lead becomes extra_actions_lead. A name that would start with a digit gets an underscore in front. You select these without quotes:
SELECT date, campaign_name, extra_sessions AS sessions
FROM my_dataset.ga4_daily;
BigQuery treats names that differ only in case as the same column. If two extras turn into the same BigQuery name, the load stops with an error naming both columns, and you rename one with a transform rule.
When you move queries between destinations
A query written for one destination does not run unchanged on the other: PostgreSQL needs "extra.sessions", BigQuery needs extra_sessions. Aliasing every extra to a plain name in a view, one view per destination, gives your dashboards the same column names on both. See the PostgreSQL destination for how the table is created and replaced.