Version 4.0.24.14
Get Query Task details
Use this function to check the status of an async query task. After the status reaches "Complete", you can call query_task_results(query_task_id) to retrieve the results of the query.
Use create_query_task() to create an async query task.
Request
GET
/query_tasks/{query_task_id}
Datatype
Description
Request
path
Expand HTTP Path definition...
query_task_id
ID of the Query Task
query
Expand HTTP Query definition...
fields
Requested fields.
Response
200: query_task
Datatype
Description
(object)
can
lock
Operations the current user is able to perform on this object
id
lock
Unique Id
query_id
Id of query
query
lock
Query
Expand Query definition...
can
lock
Operations the current user is able to perform on this object
id
lock
Unique Id
model
Model
view
Explore Name
fields
pivots
fill_fields
filters
Filters will contain data pertaining to complex filters that do not contain "or" conditions. When "or" conditions are present, filter data will be found on the `filter_expression` property.
filter_expression
Filter Expression
sorts
limit
Limit
column_limit
Column Limit
total
Total
row_total
Raw Total
subtotals
vis_config
Visualization configuration properties. These properties are typically opaque and differ based on the type of visualization used. There is no specified set of allowed keys. The values can be any type supported by JSON. A "type" key with a string value is often present, and is used by Looker to determine which visualization to present. Visualizations ignore unknown vis_config properties.
filter_config
The filter_config represents the state of the filter UI on the explore page for a given query. When running a query via the Looker UI, this parameter takes precedence over "filters". When creating a query or modifying an existing query, "filter_config" should be set to null. Setting it to any other value could cause unexpected filtering behavior. The format should be considered opaque.
visible_ui_sections
Visible UI Sections
slug
lock
Slug
dynamic_fields
Dynamic Fields
client_id
Client Id: used to generate shortened explore URLs. If set by client, must be a unique 22 character alphanumeric string. Otherwise one will be generated.
share_url
lock
Share Url
expanded_share_url
lock
Expanded Share Url
url
lock
Expanded Url
query_timezone
Query Timezone
has_table_calculations
lock
Has Table Calculations
generate_links
whether or not to generate links in the query response.
force_production
Use production models to run query (even is user is in dev mode).
path_prefix
Prefix to use for drill links.
cache
Whether or not to use the cache
server_table_calcs
Whether or not to run table calculations on the server
cache_only
Retrieve any results from cache even if the results have expired.
cache_key
lock
cache key used to cache query.
status
Status of query task.
source
Source of query task.
runtime
lock
Runtime of prior queries.
rebuild_pdts
Rebuild PDTS used in query.
result_source
lock
Source of the results of the query.
look_id
Id of look associated with query.
dashboard_id
Id of dashboard associated with query.
result_format
lock
The data format of the query results.
400: Bad Request
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
429: Too Many Requests
Datatype
Description
(object)
message
lock
Error details
documentation_url
lock
Documentation link
Examples
Python
https://github.com/looker-open-source/sdk-codegen/blob/main/examples/python/query_task.py |
https://github.com/looker-open-source/sdk-codegen/blob/main/examples/python/query_task.py |
Ruby
https://github.com/looker-open-source/sdk-codegen/blob/main/examples/ruby/stream_to_s3.rb |
https://github.com/looker-open-source/sdk-codegen/blob/main/examples/ruby/stream_to_s3.rb |