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

Expose jobTimeoutMs field in JobConfigurationQuery #1421

Closed
aravindsrinivasan opened this issue Nov 22, 2022 · 6 comments · Fixed by #1675
Closed

Expose jobTimeoutMs field in JobConfigurationQuery #1421

aravindsrinivasan opened this issue Nov 22, 2022 · 6 comments · Fixed by #1675
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

@aravindsrinivasan
Copy link

At job creation time I want to set a timeout for the job if it takes too long to run. Too many long running queries eat up the slot reservation and significantly deteriorates query performance. Currently we have to manually cancel the queries in the console. I noticed that there is a jobTimeoutMs field in the JobConfiguration object. This is not exposed by the Python client but is exposed by other Bigquery clients (Golang). Can we add this to the Python client as well?

The alternative would be to have a timer on the client side and manually cancel the request. This feels wasteful considering the feature already exists on the server side and it's just a question of exposing it in the client.

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Nov 22, 2022
@meredithslota meredithslota added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label May 26, 2023
@tswast
Copy link
Contributor

tswast commented Aug 21, 2023

This could be another good project for the apprentices.

@tswast
Copy link
Contributor

tswast commented Aug 21, 2023

Since this applies to all job configurations, this would be a good fit to add to the _JobConfig base class here:

class _JobConfig(object):

@colin-rogers-dbt
Copy link

Currently looking at how to work around this issue for users of https://github.com/dbt-labs/dbt-bigquery but solving here is definitely the ideal solution.

@lbk-fishtown
Copy link

I've started a draft PR (#1656) for this issue. I have tested the the timeout works, but I could use some guidance (pointers to docs) on what is required test wise / how to add the required tests to this.

@dataders
Copy link

@colin-rogers-dbt shipped a fix for us in dbt-labs/dbt-bigquery#902, but to reiterate, this is not the ideal place for the fix.

@dhendry
Copy link

dhendry commented Oct 18, 2023

+1 on exposing job_timeout_ms, this would be really helpful

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
7 participants