GoogleCloudPlatform / zetasql-toolkit

The ZetaSQL Toolkit is a library that helps users use ZetaSQL Java API to perform SQL analysis for multiple query engines, including BigQuery and Cloud Spanner.
Apache License 2.0
35 stars 8 forks source link

Add support for BigQuery wildcard table #70

Open dion-ricky opened 4 days ago

dion-ricky commented 4 days ago

Consider adding support for BigQuery wildcard table reference https://cloud.google.com/bigquery/docs/querying-wildcard-tables.

dion-ricky commented 3 days ago

I have added support for wildcard reference #73, but it's half-baked since only the last table registered to the catalog is detected as parent column lineage.

For example, in bigquery-public-data.noaa_gsod dataset gsod202* matches with gsod2020, gsod2021, gsod2022, gsod2023, and gsod2024. However since gsod202* is registered in the catalog pointing to gsod2024, the parent column reference is only from that one table when the parent should be all tables which name begins with gsod202.