Get Query Results
|
|||||
|
|
Retrieves the results of a query job
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- View and manage your data in Google BigQuery
- View and manage your data across Google Cloud Platform services
- View your data across Google Cloud Platform services
Input
This building block consumes 7 input parameters
Name | Format | Description |
---|---|---|
projectId Required |
STRING |
[Required] Project ID of the query job |
jobId Required |
STRING |
[Required] Job ID of the query job |
startIndex |
INTEGER |
Zero-based index of the starting row |
location |
STRING |
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 |
pageToken |
STRING |
Page token, returned by a previous call, to request the next page of results |
timeoutMs |
INTEGER |
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 |
maxResults |
INTEGER |
Maximum number of results to read |
= Parameter name
= Format
projectId STRING Required [Required] Project ID of the query job |
jobId STRING Required [Required] Job ID of the query job |
startIndex INTEGER Zero-based index of the starting row |
location STRING 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 |
pageToken STRING Page token, returned by a previous call, to request the next page of results |
timeoutMs INTEGER 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 |
maxResults INTEGER Maximum number of results to read |
Output
This building block provides 29 output parameters
Name | Format | Description |
---|---|---|
pageToken |
STRING |
A token used for paging results |
kind |
STRING |
The resource type of the response |
etag |
STRING |
A hash of this response |
jobReference |
OBJECT |
|
jobReference.location |
STRING |
The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location |
jobReference.jobId |
STRING |
[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 |
jobReference.projectId |
STRING |
[Required] The ID of the project containing this job |
cacheHit |
BOOLEAN |
Whether the query result was fetched from the query cache |
schema |
OBJECT |
|
schema.fields[] |
OBJECT |
|
schema.fields[].name |
STRING |
[Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters |
schema.fields[].type |
STRING |
[Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD) |
schema.fields[].categories |
OBJECT |
[Optional] The categories attached to this field, used for field-level access control |
schema.fields[].categories.names[] |
STRING |
|
schema.fields[].mode |
STRING |
[Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE |
schema.fields[].description |
STRING |
[Optional] The field description. The maximum length is 1,024 characters |
schema.fields[].fields[] |
OBJECT |
|
errors[] |
OBJECT |
|
errors[].reason |
STRING |
A short error code that summarizes the error |
errors[].message |
STRING |
A human-readable description of the error |
errors[].location |
STRING |
Specifies where the error occurred, if present |
errors[].debugInfo |
STRING |
Debugging information. This property is internal to Google and should not be used |
totalBytesProcessed |
INTEGER |
The total number of bytes processed for this query |
totalRows |
INTEGER |
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 |
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 |
numDmlAffectedRows |
INTEGER |
[Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE |
rows[] |
OBJECT |
|
rows[].f[] |
OBJECT |
|
rows[].f[].v |
ANY |
= Parameter name
= Format
pageToken STRING A token used for paging results |
kind STRING The resource type of the response |
etag STRING A hash of this response |
jobReference OBJECT |
jobReference.location STRING The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location |
jobReference.jobId STRING [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 |
jobReference.projectId STRING [Required] The ID of the project containing this job |
cacheHit BOOLEAN Whether the query result was fetched from the query cache |
schema OBJECT |
schema.fields[] OBJECT |
schema.fields[].name STRING [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters |
schema.fields[].type STRING [Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD) |
schema.fields[].categories OBJECT [Optional] The categories attached to this field, used for field-level access control |
schema.fields[].categories.names[] STRING |
schema.fields[].mode STRING [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE |
schema.fields[].description STRING [Optional] The field description. The maximum length is 1,024 characters |
schema.fields[].fields[] OBJECT |
errors[] OBJECT |
errors[].reason STRING A short error code that summarizes the error |
errors[].message STRING A human-readable description of the error |
errors[].location STRING Specifies where the error occurred, if present |
errors[].debugInfo STRING Debugging information. This property is internal to Google and should not be used |
totalBytesProcessed INTEGER The total number of bytes processed for this query |
totalRows INTEGER 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 |
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 |
numDmlAffectedRows INTEGER [Output-only] The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE |
rows[] OBJECT |
rows[].f[] OBJECT |
rows[].f[].v ANY |