sqlmesh icon indicating copy to clipboard operation
sqlmesh copied to clipboard

Converting an `INCREMENTAL_BY_TIME` model to a `VIEW` model as a forward-only plan fails in BigQuery

Open plaflamme opened this issue 4 months ago • 1 comments

The generated query from sqlmesh is something like

CREATE OR REPLACE VIEW ...

But BigQuery fails with the following error:

<table_snapshot_id> is not allowed for this operation because it is currently a TABLE.

So because the physical table is a TABLE (not a view), you cannot use CREATE OR REPLACE VIEW (you could only use CREATE OR REPLACE TABLE).

plaflamme avatar Sep 27 '24 18:09 plaflamme