younifyd
Menu

Bigquery.jobs.get Query Results

Retrieves the results of a query job.

GET/projects/{projectId}/queries/{jobId}

Use it in a workflow

  1. Add a step and choose the BigQuery connector.
  2. Pick the Bigquery.jobs.get Query Results action (under jobs).
  3. Fill in the fields below, then reference the result from later steps as {{bigqueryJobsGetQueryResults.response.data}}.

Request

Path parameters

projectIdstringrequired

[Required] Project ID of the query job

jobIdstringrequired

[Required] Job ID of the query job

Query parameters

altstring

Data format for the response.

One ofjson

fieldsstring

Selector specifying which fields to include in a partial response.

keystring

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

oauth_tokenstring

OAuth 2.0 token for the current user.

prettyPrintboolean

Returns response with indentations and line breaks.

quotaUserstring

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

userIpstring

Deprecated. Please use quotaUser instead.

locationstring

The geographic location where the job should run. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.

maxResultsinteger

Maximum number of results to read

pageTokenstring

Page token, returned by a previous call, to request the next page of results

startIndexstring

Zero-based index of the starting row

timeoutMsinteger

How long to wait for the query to complete, in milliseconds, before returning. Default is 10 seconds. If the timeout passes before the job completes, the 'jobComplete' field in the response will be false

Response

Returns 200 with an object. Read it in later steps with {{bigqueryJobsGetQueryResults.response.data.<field>}}.

cacheHitboolean

Whether the query result was fetched from the query cache.

errorsarray<object>

[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.

debugInfostring

Debugging information. This property is internal to Google and should not be used.

locationstring

Specifies where the error occurred, if present.

messagestring

A human-readable description of the error.

reasonstring

A short error code that summarizes the error.

etagstring

A hash of this response.

jobCompleteboolean

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.

jobReferenceobject
jobIdstring

[Required] The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.

locationstring

The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.

projectIdstring

[Required] The ID of the project containing this job.

kindstring

The resource type of the response.

Default "bigquery#getQueryResultsResponse"

numDmlAffectedRowsstring (int64)

[Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE.

pageTokenstring

A token used for paging results.

rowsarray<object>

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.

farray<object>1 fields

Represents a single row in the result set, consisting of one or more fields.

schemaobject
fieldsarray<object>13 fields

Describes the fields in a table.

totalBytesProcessedstring (int64)

The total number of bytes processed for this query.

totalRowsstring (uint64)

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.

json
{
  "cacheHit": false,
  "errors": [
    {
      "debugInfo": "string",
      "location": "string",
      "message": "string",
      "reason": "string"
    }
  ],
  "etag": "string",
  "jobComplete": false,
  "jobReference": {
    "jobId": "string",
    "location": "string",
    "projectId": "string"
  },
  "kind": "bigquery#getQueryResultsResponse",
  "numDmlAffectedRows": "string",
  "pageToken": "string",
  "rows": [
    {
      "f": [
        {
          "v": null
        }
      ]
    }
  ],
  "schema": {
    "fields": [
      {
        "categories": {
          "names": [
            "string"
          ]
        },
        "collation": "string",
        "defaultValueExpression": "string",
        "description": "string",
        "fields": [
          {}
        ],
        "maxLength": "string",
        "mode": "string",
        "name": "string",
        "policyTags": {
          "names": [
            "string"
          ]
        },
        "precision": "string",
        "roundingMode": "string",
        "scale": "string"
      }
    ]
  },
  "totalBytesProcessed": "string",
  "totalRows": "string"
}

Need more? See the BigQuery guide for connection setup and behaviour shared by every action.