TobikoData / sqlmesh

Efficient data transformation and modeling framework that is backwards compatible with dbt.

Home Page:https://sqlmesh.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bigquery][bug] Project ID in rendered table name for python models causes syntax error

jonathan-ostrander opened this issue · comments

Expected Behavior

Using the BigQuery execution engine, referencing another model from a python model and then running context.fetchdf with a query on that model should not produce any errors.

Current Behavior

Using the code similar to the docs example with a BigQuery execution engine results in the project ID being rendered with quotation marks which causes the following error to be returned from BigQuery:

google.api_core.exceptions.BadRequest: 400 Syntax error: Unexpected string literal "project-id" at [1:24]; reason: invalidQuery, location: query, message: Syntax error: Unexpected string literal "project-id" at [1:24]

The project ID should be wrapped in backticks instead of quotation marks.