Send feedback
Class Job (5.8.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 5.8.0keyboard_arrow_down
Job objects are returned from various places in the BigQuery API:
They can be used to check the status of a running job or fetching the results of a previously-executed one.
Inheritance
Operation
>
Job
Package
@google-cloud/bigquery!
Constructors
(constructor)(bigQuery, id, options)
constructor ( bigQuery : BigQuery , id : string , options ?: JobOptions );
Constructs a new instance of the Job
class
Parameters
Name
Description
bigQuery
BigQuery
id
string
options
JobOptions
Properties
bigQuery
Property Value
getQueryResultsStream
getQueryResultsStream : ( options ?: QueryResultsOptions ) = > ResourceStream<RowMetadata> ;
Property Value
Type
Description
(options?: QueryResultsOptions ) => ResourceStream <RowMetadata >
location
Property Value
Methods
cancel()
cancel () : Promise<CancelResponse> ;
Returns
Type
Description
Promise <CancelResponse >
cancel(callback)
cancel ( callback : CancelCallback ) : void ;
Parameter
Name
Description
callback
CancelCallback
Returns
getQueryResults(options)
getQueryResults ( options ?: QueryResultsOptions ) : Promise<QueryRowsResponse> ;
Parameter
Name
Description
options
QueryResultsOptions
Returns
Type
Description
Promise <QueryRowsResponse >
getQueryResults(options, callback)
getQueryResults ( options : QueryResultsOptions , callback : QueryRowsCallback ) : void ;
Parameters
Name
Description
options
QueryResultsOptions
callback
QueryRowsCallback
Returns
getQueryResults(callback)
getQueryResults ( callback : QueryRowsCallback ) : void ;
Parameter
Name
Description
callback
QueryRowsCallback
Returns
getQueryResultsAsStream_(options, callback)
getQueryResultsAsStream_ ( options : QueryResultsOptions , callback : QueryRowsCallback ) : void ;
This method will be called by getQueryResultsStream()
. It is required to properly set the autoPaginate
option value.
Parameters
Name
Description
options
QueryResultsOptions
callback
QueryRowsCallback
Returns
poll_(callback)
poll_ ( callback : MetadataCallback ) : void ;
Poll for a status update. Execute the callback:
callback(err): Job failed - callback(): Job incomplete - callback(null, metadata): Job complete
Parameter
Name
Description
callback
MetadataCallback
Returns
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-02 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-02 UTC."],[],[]]