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
39 stars 10 forks source link

Add SharedTableMigration tool #83

Closed ppaglilla closed 4 months ago

ppaglilla commented 4 months ago

Adds the ShardedTableMigrator tool under com.google.zetasql.toolkit.tools.migration.

The tool helps migrating BigQuery jobs away from date-sharded tables to partitioned tables. It automatically rewrites queries that use table wildcards and _TABLE_SUFFIX to use the new partitioned tables. Only SELECT statements and expressions are currently rewritten.