Skip to content

Commit b751265

Browse files
committed
Fix: bigquery get_table doesn't support backticks
1 parent 751d6fe commit b751265

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sqlmesh/core/engine_adapter/bigquery.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ def _get_table(self, table_name: TableName) -> BigQueryTable:
324324
Raises: `google.cloud.exceptions.NotFound` if the table does not exist.
325325
"""
326326
if isinstance(table_name, exp.Table):
327-
table_name = table_name.sql(dialect=self.dialect)
327+
# the api doesn't support backticks, so we can't call exp.table_name or sql
328+
table_name = ".".join(part.name for part in table_name.parts)
328329

329330
return self.client.get_table(table_name)
330331

0 commit comments

Comments
 (0)