-
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: Support WHERE IN or WHERE ANY clause in DB-API #9177
Labels
api: bigquery
Issues related to the BigQuery API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Comments
plamut
added
api: bigquery
Issues related to the BigQuery API.
type: question
Request for information or clarification. Not an issue.
labels
Sep 5, 2019
@haibin Thanks for the report! Would you mind providing more details, such as the BigQuery client version, and a reproducible code sample, if possible? That and any other info would be really helpful with investigating the cause, thanks! |
google-cloud-bigquery version: 1.19.0 from google.cloud import bigquery
from google.cloud.bigquery import dbapi
client = bigquery.Client()
conn = dbapi.Connection(client)
curr = conn.cursor()
query = """
SELECT name, state
FROM `bigquery-public-data.usa_names.usa_1910_2013`
WHERE state = %s
LIMIT 2
"""
curr.execute(query, ('NY', ))
result = curr.fetchall()
print(result)
query = """
SELECT name, state
FROM `bigquery-public-data.usa_names.usa_1910_2013`
WHERE state IN %s
LIMIT 2
"""
curr.execute(query, (('NY', 'TX'), ))
result = curr.fetchall()
print(result) Output
|
Alternative approach in the meantime:
|
I can confirm that the issue is reproducible. |
plamut
added
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
and removed
type: question
Request for information or clarification. Not an issue.
labels
Sep 8, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api: bigquery
Issues related to the BigQuery API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
BigQuery DB-API throws the following error when I pass parameters to the Cursor.execute() for WHERE IN or WHERE ANY clause. Any idea if it will be supported?
The text was updated successfully, but these errors were encountered: