jobs_query_results
Creates, updates, deletes, gets or lists a jobs_query_results
resource.
Overview
Name | jobs_query_results |
Type | Resource |
Id | google.bigquery.jobs_query_results |
Fields
Name | Datatype | Description |
---|---|---|
cacheHit | boolean | Whether the query result was fetched from the query cache. |
errors | array | Output only. The first errors or warnings encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful. For more information about error messages, see Error messages. |
etag | string | A hash of this response. |
jobComplete | boolean | Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available. |
jobReference | object | A job reference is a fully qualified identifier for referring to a job. |
kind | string | The resource type of the response. |
numDmlAffectedRows | string | Output only. The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. |
pageToken | string | A token used for paging results. When this token is non-empty, it indicates additional results are available. |
rows | array | An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above. Present only when the query completes successfully. The REST-based representation of this data leverages a series of JSON f,v objects for indicating fields and values. |
schema | object | Schema of a table |
totalBytesProcessed | string | The total number of bytes processed for this query. |
totalRows | string | The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. Present only when the query completes successfully. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get_query_results | SELECT | +jobId, projectId | RPC to get the results of a query job. |
SELECT
examples
RPC to get the results of a query job.
SELECT
cacheHit,
errors,
etag,
jobComplete,
jobReference,
kind,
numDmlAffectedRows,
pageToken,
rows,
schema,
totalBytesProcessed,
totalRows
FROM google.bigquery.jobs_query_results
WHERE +jobId = '{{ +jobId }}'
AND projectId = '{{ projectId }}';