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

Error when working with dataset when BigQuery source URI contains : #854

Closed
Ark-kun opened this issue Nov 19, 2021 · 0 comments · Fixed by #855
Closed

Error when working with dataset when BigQuery source URI contains : #854

Ark-kun opened this issue Nov 19, 2021 · 0 comments · Fixed by #855
Assignees
Labels
api: aiplatform Issues related to the AI Platform API. 🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@Ark-kun
Copy link
Contributor

Ark-kun commented Nov 19, 2021

I receive error when I try working with dataset that has : in the BigQuery source URI:
BadRequest: 400 GET https://bigquery.googleapis.com/bigquery/v2/projects/140626129697/datasets/bigquery-public-data:chicago_taxi_trips/tables/taxi_trips?prettyPrint=false: 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.

The Vertex Backend supports the dataset and the UX shows columns and types.

Environment details

  • OS type and version:
  • google-cloud-aiplatform version: 1.4.0

Steps to reproduce

aiplatform.TabularDataset('projects/140626129697/locations/us-central1/datasets/4730389293762084864').column_names

Stack trace

---------------------------------------------------------------------------
BadRequest                                Traceback (most recent call last)
<ipython-input-153-50eba4b09d21> in <module>
----> 1 bug_dataset.column_names

/opt/conda/lib/python3.7/site-packages/google/cloud/aiplatform/datasets/tabular_dataset.py in column_names(self)
     85                 No more than 64 user labels can be associated with one Tensorboard
     86                 (System labels are excluded).
---> 87                 See https://goo.gl/xmQnxf for more information and examples of labels.
     88                 System reserved label keys are prefixed with "aiplatform.googleapis.com/"
     89                 and are immutable.

/opt/conda/lib/python3.7/site-packages/google/cloud/aiplatform/datasets/tabular_dataset.py in _retrieve_bq_source_columns(project, bq_table_uri, credentials)

/opt/conda/lib/python3.7/site-packages/google/cloud/bigquery/client.py in get_table(self, table, retry, timeout)
    695         table_ref = _table_arg_to_table_ref(table, default_project=self.project)
    696         api_response = self._call_api(
--> 697             retry, method="GET", path=table_ref.path, timeout=timeout
    698         )
    699         return Table.from_api_repr(api_response)

/opt/conda/lib/python3.7/site-packages/google/cloud/bigquery/client.py in _call_api(self, retry, **kwargs)
    572         if retry:
    573             call = retry(call)
--> 574         return call()
    575 
    576     def get_dataset(self, dataset_ref, retry=DEFAULT_RETRY, timeout=None):

/opt/conda/lib/python3.7/site-packages/google/api_core/retry.py in retry_wrapped_func(*args, **kwargs)
    289                 sleep_generator,
    290                 self._deadline,
--> 291                 on_error=on_error,
    292             )
    293 

/opt/conda/lib/python3.7/site-packages/google/api_core/retry.py in retry_target(target, predicate, sleep_generator, deadline, on_error)
    187     for sleep in sleep_generator:
    188         try:
--> 189             return target()
    190 
    191         # pylint: disable=broad-except

/opt/conda/lib/python3.7/site-packages/google/cloud/_http.py in api_request(self, method, path, query_params, data, content_type, headers, api_base_url, api_version, expect_json, _target_object, timeout)
    482 
    483         if not 200 <= response.status_code < 300:
--> 484             raise exceptions.from_http_response(response)
    485 
    486         if expect_json and response.content:

BadRequest: 400 GET https://bigquery.googleapis.com/bigquery/v2/projects/140626129697/datasets/bigquery-public-data:chicago_taxi_trips/tables/taxi_trips?prettyPrint=false: 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.

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

@product-auto-label product-auto-label bot added the api: aiplatform Issues related to the AI Platform API. label Nov 19, 2021
Ark-kun added a commit to Ark-kun/python-aiplatform that referenced this issue Nov 19, 2021
The colon-based "project:dataset.table" format is no longer supported.

Fixes: googleapis#854
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Nov 19, 2021
Ark-kun added a commit to Ark-kun/python-aiplatform that referenced this issue Nov 19, 2021
The colon-based "project:dataset.table" format is no longer supported.

Fixes: googleapis#854
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Nov 24, 2021
ivanmkc added a commit that referenced this issue Jan 11, 2022
* fix: Fixed BigQuery datasets that have colon in URI

The colon-based "project:dataset.table" format is no longer supported.

Fixes: #854

* Fixed the fix

Co-authored-by: Gergely Imreh <[email protected]>

Co-authored-by: Karl Weinmeister <[email protected]>
Co-authored-by: sasha-gitg <[email protected]>
Co-authored-by: Gergely Imreh <[email protected]>
Co-authored-by: Ivan Cheung <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: aiplatform Issues related to the AI Platform API. 🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants