Skip to content

Commit 0380174

Browse files
committed
Fix mypy error
1 parent eac8745 commit 0380174

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sqlmesh/core/engine_adapter/bigquery.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,8 @@ def get_bq_schema(self, table_name: TableName) -> t.List[bigquery.SchemaField]:
296296
table = exp.to_table(table_name)
297297
if len(table.parts) == 3 and "." in table.name:
298298
self.execute(exp.select("*").from_(table).limit(0))
299+
if not self._query_job:
300+
raise ValueError("Query job was not created?")
299301
return self._query_job._query_results.schema
300302
return self._get_table(table).schema
301303

0 commit comments

Comments
 (0)