Skip to main content

jobs_query_results

Creates, updates, deletes, gets or lists a jobs_query_results resource.

Overview

Namejobs_query_results
TypeResource
Idgoogle.bigquery.jobs_query_results

Fields

NameDatatypeDescription
cacheHitbooleanWhether the query result was fetched from the query cache.
errorsarrayOutput 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.
etagstringA hash of this response.
jobCompletebooleanWhether 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.
jobReferenceobjectA job reference is a fully qualified identifier for referring to a job.
kindstringThe resource type of the response.
numDmlAffectedRowsstringOutput only. The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.
pageTokenstringA token used for paging results. When this token is non-empty, it indicates additional results are available.
rowsarrayAn 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.
schemaobjectSchema of a table
totalBytesProcessedstringThe total number of bytes processed for this query.
totalRowsstringThe 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

NameAccessible byRequired ParamsDescription
get_query_resultsSELECT+jobId, projectIdRPC 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 }}';