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

Not able to use ScriptOptions #684

Closed
AdityaMaddula opened this issue Jun 3, 2021 · 1 comment · Fixed by #690
Closed

Not able to use ScriptOptions #684

AdityaMaddula opened this issue Jun 3, 2021 · 1 comment · Fixed by #690
Assignees
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

@AdityaMaddula
Copy link

Environment details

  • OS type and version: MacOs
  • Python version: Python 3.6.6
  • pip version: 20.2
  • google-cloud-bigquery version: 2.18.0

Code example

bigquery.QueryJobConfig(scriptOptions={"statementTimeoutMs": 10})

I am looking for a way to set timeouts for SQL statements(if a query takes more than a min we want to abort it. We can cancel it by calling cancel API though, But I am looking for config which aborts it on bigquery side itself. Something like session timeout for snowflake). After searching the documentation, I found https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#ScriptOptions. But looks like it's not supported in 2.18.0. Is there a way to make this work ?

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Jun 3, 2021
@plamut
Copy link
Contributor

plamut commented Jun 3, 2021

@AdityaMaddula I don't see that in the source code, but it's indeed described in the API docs. At a quick glance it seems that we could add this, yes.

@plamut plamut added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Jun 3, 2021
@plamut plamut self-assigned this Jun 3, 2021
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

Successfully merging a pull request may close this issue.

2 participants