Query
laktory.models.resources.databricks.Query
¤
Bases: QueryBase
Databricks Query
Examples:
import io
from laktory import models
query_yaml = '''
display_name: stock-prices
parent_path: /queries
query_text: SELECT * FROM dev.finance.slv_stock_prices
warehouse_id: a7d9f2kl8mp3q6rt
access_controls:
- group_name: account users
permission_level: CAN_RUN
'''
query = models.resources.databricks.Query.model_validate_yaml(
io.StringIO(query_yaml)
)
References
| BASE | DESCRIPTION |
|---|---|
apply_auto_limit
|
Whether to apply a 1000 row limit to the query result
TYPE:
|
catalog
|
Name of the catalog where this query will be executed
TYPE:
|
description
|
General description that conveys additional information about this query such as usage notes
TYPE:
|
display_name
|
Name of the query
TYPE:
|
owner_user_name
|
Query owner's username
TYPE:
|
parameter
|
Query parameter definition. Consists of following attributes (one of
TYPE:
|
query_text
|
Text of SQL query
TYPE:
|
run_as_mode
|
Sets the 'Run as' role for the object. Should be one of
TYPE:
|
schema_
|
Name of the schema where this query will be executed
TYPE:
|
tags
|
Tags that will be added to the query
TYPE:
|
warehouse_id
|
ID of a SQL warehouse which will be used to execute this query
TYPE:
|
| LAKTORY | DESCRIPTION |
|---|---|
access_controls
|
Access controls list
TYPE:
|
name_prefix
|
TYPE:
|
name_suffix
|
TYPE:
|
parent_path_
|
The path to a workspace folder (inside laktory root) containing the query. If changed, the query will be recreated.
TYPE:
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
additional_core_resources |
TYPE:
|
additional_core_resources
property
¤
- permissions
- alert
laktory.models.resources.databricks.query.QueryParameter
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
date_range_value
|
(Block) Manually specified date-time range value. Consists of the following attributes: *
TYPE:
|
date_value
|
(String) Manually specified date-time value
TYPE:
|
enum_value
|
(Block) Dropdown parameter value. Consists of following attributes:
TYPE:
|
name
|
Literal parameter marker that appears between double curly braces in the query text
TYPE:
|
numeric_value
|
(Block) Numeric parameter value. Consists of following attributes:
TYPE:
|
query_backed_value
|
(Block) Query-based dropdown parameter value. Consists of following attributes:
TYPE:
|
text_value
|
(Block) Text parameter value. Consists of following attributes:
TYPE:
|
title
|
Text displayed in the user-facing parameter widget in the UI
TYPE:
|
laktory.models.resources.databricks.query.QueryParameterDateRangeValue
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
date_range_value
|
(Block) Manually specified date-time range value. Consists of the following attributes: *
TYPE:
|
dynamic_date_range_value
|
(String) Dynamic date-time range value based on current date-time. Possible values are
TYPE:
|
precision
|
Date-time precision to format the value into when the query is run. Possible values are
TYPE:
|
start_day_of_week
|
Specify what day that starts the week
TYPE:
|
laktory.models.resources.databricks.query.QueryParameterDateRangeValueDateRangeValue
¤
laktory.models.resources.databricks.query.QueryParameterDateValue
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
date_value
|
(String) Manually specified date-time value
TYPE:
|
dynamic_date_value
|
(String) Dynamic date-time value based on current date-time. Possible values are
TYPE:
|
precision
|
Date-time precision to format the value into when the query is run. Possible values are
TYPE:
|
laktory.models.resources.databricks.query.QueryParameterEnumValue
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
enum_options
|
(String) List of valid query parameter values, newline delimited
TYPE:
|
multi_values_options
|
If specified, allows multiple values to be selected for this parameter. Consists of following attributes:
TYPE:
|
values
|
(Array of strings) List of selected query parameter values
TYPE:
|
laktory.models.resources.databricks.query.QueryParameterEnumValueMultiValuesOptions
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
prefix
|
Character that prefixes each selected parameter value
TYPE:
|
separator
|
Character that separates each selected parameter value. Defaults to a comma
TYPE:
|
suffix
|
Character that suffixes each selected parameter value
TYPE:
|
laktory.models.resources.databricks.query.QueryParameterNumericValue
¤
laktory.models.resources.databricks.query.QueryParameterQueryBackedValue
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
multi_values_options
|
If specified, allows multiple values to be selected for this parameter. Consists of following attributes:
TYPE:
|
query_id
|
ID of the query that provides the parameter values
TYPE:
|
values
|
(Array of strings) List of selected query parameter values
TYPE:
|
laktory.models.resources.databricks.query.QueryParameterQueryBackedValueMultiValuesOptions
¤
Bases: BaseModel
| PARAMETER | DESCRIPTION |
|---|---|
prefix
|
Character that prefixes each selected parameter value
TYPE:
|
separator
|
Character that separates each selected parameter value. Defaults to a comma
TYPE:
|
suffix
|
Character that suffixes each selected parameter value
TYPE:
|