Class Job (5.6.0)
Stay organized with collections
Save and categorize content based on your preferences.
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
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 2024-05-03 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]