Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed BigQuery datasets that have colon in URI #855

Merged
6 changes: 6 additions & 0 deletions google/cloud/aiplatform/datasets/column_names_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@ def _retrieve_bq_source_columns(
if bq_table_uri.startswith(prefix):
bq_table_uri = bq_table_uri[len(prefix) :]

# The colon-based "project:dataset.table" format is no longer supported:
# Invalid dataset ID "bigquery-public-data:chicago_taxi_trips".
# Dataset IDs must be alphanumeric (plus underscores and dashes) and must be at most 1024 characters long.
# Using dot-based "project.dataset.table" format instead.
bq_table_uri = bq_table_uri.replace(":", ".")

client = bigquery.Client(project=project, credentials=credentials)
table = client.get_table(bq_table_uri)
schema = table.schema
Expand Down