- Notifications
You must be signed in to change notification settings - Fork 321
Closed
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.Issues related to the googleapis/python-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Environment details
BigQuery client v1.24.0, all Python versions.
Steps to reproduce
-
Fire up a Jupyter notebook or an IPython session and load the
bigqueryextension:%load_ext google.cloud.bigquery -
Use the
bigquerycell magic without specifying the query:%%bigquery --project my-project --destination_table my_dataset.my_table
Actual result:
An error message is displayed, but is kind of misleading:
ERROR: table_id must be a fully-qualified ID in standard SQL format, e.g., "project.dataset.table_id", got It might make the user wonder why the table ID is incorrect even if --destination is correctly specified.
Expected result:
The error message should explain that the query is missing in the cell body.
Proposed solution
The current implementation assumes that any query without whitespace represents a table ID, but it fails to check if the query is non-empty in the first place. The latter check should be added.
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.Issues related to the googleapis/python-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.