-
Notifications
You must be signed in to change notification settings - Fork 138
Closed
Labels
api: bigqueryIssues related to the googleapis/python-bigquery-sqlalchemy API.Issues related to the googleapis/python-bigquery-sqlalchemy 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
While using the library to execute a query in dry run mode, I got an error like the following: 404 GET https://bigquery.googleapis.com/bigquery/v2/projects/MYDATASET/queries/None?maxResults=0&location=US: Not found: Job MYDATASET:US.None
The code I used to execute the query is:
from pybigquery.api import ApiClient
credentials_info = {
"type": "...",
"project_id": "...",
"private_key_id": "...",
"private_key": "...",
"client_email": "...",
"client_id": "...",
"auth_uri": "...",
"token_uri": "...",
"auth_provider_x509_cert_url": "...",
"client_x509_cert_url": "..."
}
engine = create_engine('bigquery:///MYDATASET?dry_run=true', credentials_info=credentials_info)
query = 'SELECT column1 FROM `myschema`.`mytable` LIMIT 1'
try:
with engine.connect() as conn:
results = conn.execute(query)
When I execute the query with an engine that does not specify the dry run (e.g. engine = create_engine('bigquery:///MYDATASET', credentials_info=credentials_info)), the results are returned correctly.
Am I missing some parameters or special configuration for dry run queries?
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the googleapis/python-bigquery-sqlalchemy API.Issues related to the googleapis/python-bigquery-sqlalchemy 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.