Skip to content

Commit

Permalink
fix(ingest): rectify filter for BigQuery external tables
Browse files Browse the repository at this point in the history
In the SQL statement querying BigQuery table metadata, the `table_type`
is incorrectly filtered for external tables:

According to the [official
documentation](https://cloud.google.com/bigquery/docs/information-schema-tables#schema),
the `table_type` will be `EXTERNAL` for external tables. The query
incorrectly expected it to be `EXTERNAL TABLE` instead.
  • Loading branch information
janhicken committed Dec 8, 2022
1 parent 5b52534 commit 763f882
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class BigqueryQuery:
table_name) as p on
t.table_name = p.table_name
WHERE
table_type in ('BASE TABLE', 'EXTERNAL TABLE')
table_type in ('BASE TABLE', 'EXTERNAL')
{table_filter}
order by
table_schema ASC,
Expand All @@ -146,7 +146,7 @@ class BigqueryQuery:
and t.TABLE_NAME = tos.TABLE_NAME
and tos.OPTION_NAME = "description"
WHERE
table_type in ('BASE TABLE', 'EXTERNAL TABLE')
table_type in ('BASE TABLE', 'EXTERNAL')
{table_filter}
order by
table_schema ASC,
Expand Down

0 comments on commit 763f882

Please sign in to comment.