You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BigQuery: Add support to Dataset for project_ids with org prefix. #8646
fromgoogle.cloudimportbigqueryclient=bigquery.Client()
dataset_id=f"{client.project}.ryan_dataset".
# Construct a full Dataset object to send to the API.dataset=bigquery.Dataset(dataset_id)
Stack trace
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-14-bfe46d108801> in <module>
----> 1 dataset = bigquery.Dataset(dataset_id)
~/.virtualenvs/bigquery/lib/python3.6/site-packages/google/cloud/bigquery/dataset.py in __init__(self, dataset_ref)
368 def __init__(self, dataset_ref):
369 if isinstance(dataset_ref, six.string_types):
--> 370 dataset_ref = DatasetReference.from_string(dataset_ref)
371 self._properties = {"datasetReference": dataset_ref.to_api_repr(), "labels": {}}
372
~/.virtualenvs/bigquery/lib/python3.6/site-packages/google/cloud/bigquery/dataset.py in from_string(cls, dataset_id, default_project)
305 "Too many parts in dataset_id. Expected a fully-qualified "
306 "dataset ID in standard SQL format. e.g. "
--> 307 '"project.dataset_id", got {}'.format(dataset_id)
308 )
309
ValueError: Too many parts in dataset_id. Expected a fully-qualified dataset ID in standard SQL format. e.g. "project.dataset_id", got google.com:[project].ryan_dataset
changed the title [-]Bigquery Dataset does not support a project_id with org prefix[/-][+]Bigquery: add support to Dataset for project_ids with org prefix.[/+]on Jul 11, 2019
changed the title [-]Bigquery: add support to Dataset for project_ids with org prefix.[/-][+]Bigquery: Add support to Dataset for project_ids with org prefix.[/+]on Jul 11, 2019
changed the title [-]Bigquery: Add support to Dataset for project_ids with org prefix.[/-][+]BigQuery: Add support to Dataset for project_ids with org prefix.[/+]on Jul 11, 2019
Activity
[-]Bigquery Dataset does not support a project_id with org prefix[/-][+]Bigquery: add support to Dataset for project_ids with org prefix.[/+][-]Bigquery: add support to Dataset for project_ids with org prefix.[/-][+]Bigquery: Add support to Dataset for project_ids with org prefix.[/+][-]Bigquery: Add support to Dataset for project_ids with org prefix.[/-][+]BigQuery: Add support to Dataset for project_ids with org prefix.[/+]ryanreno commentedon Jul 11, 2019
A workaround I found: