Bigquery Jobs should match the Futures interface #3556
Labels
api: bigquery
Issues related to the BigQuery API.
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Presently, bigquery uses a custom
Job
class (and subclasses) to deal with long-running operations such as queries and data import.The Job class causes the proliferation of code like this around all of our samples and user code:
Which in terms means our samples require a level on indirection to accomplish simple tasks:
However, our gax-based clients share a common "Long Running Operation" strategy that surfaces these types of on-going operations as a class that implements the
concurrent.futures.Future
interface. This is implemented asgax._OperationFuture
. bigquery unfortunately can not use this as it's an http-only API and gax can only currently be used for gRPC APIs.We should make the
_BaseJob
class and its subclasses closely conform to theFuture
interface so that the usage is similar to other API client and so that we can simplify usage to:The text was updated successfully, but these errors were encountered: