Version 4.0.24.20 (latest)
Run a saved SQL interface query.
This runs a previously created SQL interface query.
The 'result_format' parameter specifies the desired structure and format of the response.
Supported formats:
result_format | Description |
---|---|
json_bi | Row data plus metadata describing the fields, pivots, table calcs, and other aspects of the query |
Request
GET
/sql_interface_queries/{query_id}/run/{result_format}
Datatype
Description
Request
path
Expand HTTP Path definition...
query_id
Integer id of query
result_format
Format of result, options are: ["json_bi"]
Response
200: Query Result
Datatype
Description
(object)
metadata
lock
Metadata about the query
Expand JsonBiMetadata definition...
big_query_metadata
lock
Metadata returned from Bigquery. Null if any other dialect.
Expand JsonBiBigQueryMetadata definition...
total_bytes_processed
lock
Total bytes processed by the BigQuery job
backend_cache_hit
lock
Return whether or not query results were served from the BigQuery cache.
fields
lock
Fields
Expand JsonBiFields definition...
dimensions
measures
pivots
table_calculations
pivots
Expand JsonBiPivots definition...
key
lock
Pivot Column Value
data
lock
Pivot Data
sort_values
lock
Pivot Sort Values
is_total
lock
If the value is a total
has_subtotals
lock
If the query has subtotals
has_totals
lock
If the query has totals
columns_truncated
lock
If the query results hit the maximum column limit and additional columns were truncated
filter_expression
lock
Filter expression applied to the query results
filters
lock
Filters applied to the query results
sql
lock
Raw sql query. Null if user does not have permission to view sql
rows
400: Bad Request
Datatype
Description
(object)
message
lock
Error details
documentation_url
lock
Documentation link
403: Permission Denied
Datatype
Description
(object)
message
lock
Error details
documentation_url
lock
Documentation link
404: Not Found
Datatype
Description
(object)
message
lock
Error details
documentation_url
lock
Documentation link
422: Validation Error
Datatype
Description
(object)
message
lock
Error details
errors
Expand ValidationErrorDetail definition...
field
lock
Field with error
code
lock
Error code
message
lock
Error info message
documentation_url
lock
Documentation link
documentation_url
lock
Documentation link
429: Too Many Requests
Datatype
Description
(object)
message
lock
Error details
documentation_url
lock
Documentation link