Query
Query object
- idstring
UUID identifying the query.
- display_namestring
Display name of the query that appears in list views, widget headings, and on the query page.
- descriptionstring
General description that conveys additional information about this query such as usage notes.
- owner_user_namestring
Username of the user that owns the query.
- warehouse_idstring
ID of the SQL warehouse attached to the query.
- query_textstring
Text of the query to be run.
- run_as_modestring
Sets the "Run as" role for the object.
- lifecycle_statestring
Indicates whether the query is trashed.
- last_modifier_user_namestring
Username of the user who last saved changes to this query.
- parent_pathstring
Workspace path of the workspace folder containing the object.
- tagsarray of string
- create_timestring
Timestamp when this query was created.
- update_timestring
Timestamp when this query was last updated.
- parametersarray of object
List of query parameter definitions.
Show child attributesHide child attributes
- titlestring
Text displayed in the user-facing parameter widget in the UI.
- namestring
Literal parameter marker that appears between double curly braces in the query text.
- text_valueobject
Text query parameter value.
Show child attributesHide child attributes
- valuestring
- numeric_valueobject
Numeric query parameter value.
Show child attributesHide child attributes
- valuedouble
- enum_valueobject
Dropdown query parameter value.
Show child attributesHide child attributes
- valuesarray of string
List of selected query parameter values.
- enum_optionsstring
List of valid query parameter values, newline delimited.
- multi_values_optionsobject
If specified, allows multiple values to be selected for this parameter.
Show child attributesHide child attributes
- prefixstring
Character that prefixes each selected parameter value.
- separatorstring
Character that separates each selected parameter value. Defaults to a comma.
- suffixstring
Character that suffixes each selected parameter value.
- date_valueobject
Date query parameter value. Can only specify one of
dynamic_date_valueordate_value.Show child attributesHide child attributes
- dynamic_date_valuestring
Dynamic date-time value based on current date-time.
- date_valuestring
Manually specified date-time value.
- precisionstring
Date-time precision to format the value into when the query is run. Defaults to DAY_PRECISION (YYYY-MM-DD).
- date_range_valueobject
Date-range query parameter value. Can only specify one of
dynamic_date_range_valueordate_range_value.Show child attributesHide child attributes
- dynamic_date_range_valuestring
Dynamic date-time range value based on current date-time.
- date_range_valueobject
Manually specified date-time range value.
Show child attributesHide child attributes
- startstring
- endstring
- precisionstring
Date-time precision to format the value into when the query is run. Defaults to DAY_PRECISION (YYYY-MM-DD).
- start_day_of_weekint32
- query_backed_valueobject
Query-based dropdown query parameter value.
Show child attributesHide child attributes
- valuesarray of string
List of selected query parameter values.
- query_idstring
UUID of the query that provides the parameter values.
- multi_values_optionsobject
If specified, allows multiple values to be selected for this parameter.
Show child attributesHide child attributes
- prefixstring
Character that prefixes each selected parameter value.
- separatorstring
Character that separates each selected parameter value. Defaults to a comma.
- suffixstring
Character that suffixes each selected parameter value.
- apply_auto_limitboolean
Whether to apply a 1000 row limit to the query result.
- catalogstring
Name of the catalog where this query will be executed.
- schemastring
Name of the schema where this query will be executed.
Get GA
GET
Gets a query.
API scopes: sql
Parameters
- idstringpath
Response
Returns the Query object.
List GA
GET
Gets a list of queries accessible to the user, ordered by creation time. Warning: Calling this API concurrently 10 or more times could result in throttling, service degradation, or a temporary ban.
API scopes: sql
Parameters
- page_tokenstringquery
- page_sizeint32query
Response
- resultsarray of object
Show child attributesHide child attributes
- idstring
UUID identifying the query.
- display_namestring
Display name of the query that appears in list views, widget headings, and on the query page.
- descriptionstring
General description that conveys additional information about this query such as usage notes.
- owner_user_namestring
Username of the user that owns the query.
- warehouse_idstring
ID of the SQL warehouse attached to the query.
- query_textstring
Text of the query to be run.
- run_as_modestring
Sets the "Run as" role for the object.
- lifecycle_statestring
Indicates whether the query is trashed.
- last_modifier_user_namestring
Username of the user who last saved changes to this query.
- parent_pathstring
Workspace path of the workspace folder containing the object.
- tagsarray of string
- create_timestring
Timestamp when this query was created.
- update_timestring
Timestamp when this query was last updated.
- parametersarray of object
List of query parameter definitions.
Show child attributesHide child attributes
- titlestring
Text displayed in the user-facing parameter widget in the UI.
- namestring
Literal parameter marker that appears between double curly braces in the query text.
- text_valueobjectRequired
Text query parameter value.
Show child attributesHide child attributes
- valuestring
- numeric_valueobjectRequired
Numeric query parameter value.
Show child attributesHide child attributes
- valuedouble
- enum_valueobjectRequired
Dropdown query parameter value.
Show child attributesHide child attributes
- valuesarray of string
List of selected query parameter values.
- enum_optionsstring
List of valid query parameter values, newline delimited.
- multi_values_optionsobject
If specified, allows multiple values to be selected for this parameter.
- date_valueobjectRequired
Date query parameter value. Can only specify one of
dynamic_date_valueordate_value.Show child attributesHide child attributes
- dynamic_date_valuestringRequired
Dynamic date-time value based on current date-time.
- date_valuestringRequired
Manually specified date-time value.
- precisionstring
Date-time precision to format the value into when the query is run. Defaults to DAY_PRECISION (YYYY-MM-DD).
- date_range_valueobjectRequired
Date-range query parameter value. Can only specify one of
dynamic_date_range_valueordate_range_value.Show child attributesHide child attributes
- dynamic_date_range_valuestringRequired
Dynamic date-time range value based on current date-time.
- date_range_valueobjectRequired
Manually specified date-time range value.
- precisionstring
Date-time precision to format the value into when the query is run. Defaults to DAY_PRECISION (YYYY-MM-DD).
- start_day_of_weekint32
- query_backed_valueobjectRequired
Query-based dropdown query parameter value.
Show child attributesHide child attributes
- valuesarray of string
List of selected query parameter values.
- query_idstring
UUID of the query that provides the parameter values.
- multi_values_optionsobject
If specified, allows multiple values to be selected for this parameter.
- apply_auto_limitboolean
Whether to apply a 1000 row limit to the query result.
- catalogstring
Name of the catalog where this query will be executed.
- schemastring
Name of the schema where this query will be executed.
- next_page_tokenstring
Create GA
POST
Creates a query.
API scopes: sql
Request body
- queryobject
Show child attributesHide child attributes
- idstring
UUID identifying the query.
- display_namestring
Display name of the query that appears in list views, widget headings, and on the query page.
- descriptionstring
General description that conveys additional information about this query such as usage notes.
- owner_user_namestring
Username of the user that owns the query.
- warehouse_idstring
ID of the SQL warehouse attached to the query.
- query_textstring
Text of the query to be run.
- run_as_modestring
Sets the "Run as" role for the object.
- lifecycle_statestring
Indicates whether the query is trashed.
- last_modifier_user_namestring
Username of the user who last saved changes to this query.
- parent_pathstring
Workspace path of the workspace folder containing the object.
- tagsarray of string
- create_timestring
Timestamp when this query was created.
- update_timestring
Timestamp when this query was last updated.
- parametersarray of object
List of query parameter definitions.
Show child attributesHide child attributes
- titlestring
Text displayed in the user-facing parameter widget in the UI.
- namestring
Literal parameter marker that appears between double curly braces in the query text.
- text_valueobjectRequired
Text query parameter value.
Show child attributesHide child attributes
- valuestring
- numeric_valueobjectRequired
Numeric query parameter value.
Show child attributesHide child attributes
- valuedouble
- enum_valueobjectRequired
Dropdown query parameter value.
Show child attributesHide child attributes
- valuesarray of string
List of selected query parameter values.
- enum_optionsstring
List of valid query parameter values, newline delimited.
- multi_values_optionsobject
If specified, allows multiple values to be selected for this parameter.
- date_valueobjectRequired
Date query parameter value. Can only specify one of
dynamic_date_valueordate_value.Show child attributesHide child attributes
- dynamic_date_valuestringRequired
Dynamic date-time value based on current date-time.
- date_valuestringRequired
Manually specified date-time value.
- precisionstring
Date-time precision to format the value into when the query is run. Defaults to DAY_PRECISION (YYYY-MM-DD).
- date_range_valueobjectRequired
Date-range query parameter value. Can only specify one of
dynamic_date_range_valueordate_range_value.Show child attributesHide child attributes
- dynamic_date_range_valuestringRequired
Dynamic date-time range value based on current date-time.
- date_range_valueobjectRequired
Manually specified date-time range value.
- precisionstring
Date-time precision to format the value into when the query is run. Defaults to DAY_PRECISION (YYYY-MM-DD).
- start_day_of_weekint32
- query_backed_valueobjectRequired
Query-based dropdown query parameter value.
Show child attributesHide child attributes
- valuesarray of string
List of selected query parameter values.
- query_idstring
UUID of the query that provides the parameter values.
- multi_values_optionsobject
If specified, allows multiple values to be selected for this parameter.
- apply_auto_limitboolean
Whether to apply a 1000 row limit to the query result.
- catalogstring
Name of the catalog where this query will be executed.
- schemastring
Name of the schema where this query will be executed.
- auto_resolve_display_nameboolean
If true, automatically resolve query display name conflicts. Otherwise, fail the request if the query's display name conflicts with an existing query's display name.
Response
Returns the Query object.
Update GA
PATCH
Updates a query.
API scopes: sql
Parameters
- idstringpath
Request body
- queryobject
Show child attributesHide child attributes
- idstring
UUID identifying the query.
- display_namestring
Display name of the query that appears in list views, widget headings, and on the query page.
- descriptionstring
General description that conveys additional information about this query such as usage notes.
- owner_user_namestring
Username of the user that owns the query.
- warehouse_idstring
ID of the SQL warehouse attached to the query.
- query_textstring
Text of the query to be run.
- run_as_modestring
Sets the "Run as" role for the object.
- lifecycle_statestring
Indicates whether the query is trashed.
- last_modifier_user_namestring
Username of the user who last saved changes to this query.
- parent_pathstring
Workspace path of the workspace folder containing the object.
- tagsarray of string
- create_timestring
Timestamp when this query was created.
- update_timestring
Timestamp when this query was last updated.
- parametersarray of object
List of query parameter definitions.
Show child attributesHide child attributes
- titlestring
Text displayed in the user-facing parameter widget in the UI.
- namestring
Literal parameter marker that appears between double curly braces in the query text.
- text_valueobjectRequired
Text query parameter value.
Show child attributesHide child attributes
- valuestring
- numeric_valueobjectRequired
Numeric query parameter value.
Show child attributesHide child attributes
- valuedouble
- enum_valueobjectRequired
Dropdown query parameter value.
Show child attributesHide child attributes
- valuesarray of string
List of selected query parameter values.
- enum_optionsstring
List of valid query parameter values, newline delimited.
- multi_values_optionsobject
If specified, allows multiple values to be selected for this parameter.
- date_valueobjectRequired
Date query parameter value. Can only specify one of
dynamic_date_valueordate_value.Show child attributesHide child attributes
- dynamic_date_valuestringRequired
Dynamic date-time value based on current date-time.
- date_valuestringRequired
Manually specified date-time value.
- precisionstring
Date-time precision to format the value into when the query is run. Defaults to DAY_PRECISION (YYYY-MM-DD).
- date_range_valueobjectRequired
Date-range query parameter value. Can only specify one of
dynamic_date_range_valueordate_range_value.Show child attributesHide child attributes
- dynamic_date_range_valuestringRequired
Dynamic date-time range value based on current date-time.
- date_range_valueobjectRequired
Manually specified date-time range value.
- precisionstring
Date-time precision to format the value into when the query is run. Defaults to DAY_PRECISION (YYYY-MM-DD).
- start_day_of_weekint32
- query_backed_valueobjectRequired
Query-based dropdown query parameter value.
Show child attributesHide child attributes
- valuesarray of string
List of selected query parameter values.
- query_idstring
UUID of the query that provides the parameter values.
- multi_values_optionsobject
If specified, allows multiple values to be selected for this parameter.
- apply_auto_limitboolean
Whether to apply a 1000 row limit to the query result.
- catalogstring
Name of the catalog where this query will be executed.
- schemastring
Name of the schema where this query will be executed.
- update_maskstring
- auto_resolve_display_nameboolean
If true, automatically resolve alert display name conflicts. Otherwise, fail the request if the alert's display name conflicts with an existing alert's display name.
Response
Returns the Query object.