Skip to content
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

Support for JSON query parameters #1448

Open
maingoh opened this issue Dec 21, 2022 · 0 comments
Open

Support for JSON query parameters #1448

maingoh opened this issue Dec 21, 2022 · 0 comments
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@maingoh
Copy link

maingoh commented Dec 21, 2022

It is currently not possible to escape json parameters in a query like this:

job_config = bigquery.QueryJobConfig(
    config.query_parameters=[
        bigquery.JsonQueryParameter("data", {"foo": "bar"})
    ]
)
stmt = 'UPDATE FROM my_table SET data=@data';
query_job = client.query(stmt, job_config=job_config)

It seem quite important to avoid SQL injections.

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Dec 21, 2022
@tswast tswast added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Jan 18, 2023
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 googleapis/python-bigquery API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants