-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
BigQuery dataset.list_tables() fails when the dataset is empty #1419
Comments
Thanks @evmin! |
I reproduced with >>> from gcloud import bigquery
>>> client = bigquery.Client()
>>> dataset_name = 'foo_bar_baz'
>>> dataset = client.dataset(dataset_name)
>>> if dataset.exists():
... raise ValueError('Expected a new dataset')
...
>>> dataset.create()
>>> dataset.exists()
True
>>> all_tables, token = dataset.list_tables()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "gcloud/bigquery/dataset.py", line 553, in list_tables
for resource in resp['tables']]
KeyError: 'tables'
>>> dataset.delete()
>>> at 2323e1a |
What is the content of |
@tseaver I sent out a fix for this already. |
Oops, my bad. |
@tseaver Here is the full payload {
"etag": "\"AMpOK...\"",
"kind": "bigquery#tableList",
"totalItems": 0
} Anything issue there before I merge the fix? |
Nope, I was just "arguing with the ref": like it would have hurt the back-end to send the extra 13 bytes. :( |
Gotcha. |
Good day.
Getting this exception when the BigQuery dataset contains no tables:
Mac OS X El Capitan. gcloud 0.8.0
The text was updated successfully, but these errors were encountered: