Query
laktory.models.resources.databricks.Query
¤
Bases: BaseModel
, PulumiResource
, TerraformResource
Databricks Query
ATTRIBUTE | DESCRIPTION |
---|---|
access_controls |
Query access controls
TYPE:
|
dirpath |
Workspace directory inside rootpath in which the query is deployed.
Used only if
TYPE:
|
display_name |
Name of the query.
TYPE:
|
query_text |
Text of SQL query.
TYPE:
|
warehouse_id |
ID of a SQL warehouse which will be used to execute this query.
TYPE:
|
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:
|
owner_user_name |
Query owner's username.
TYPE:
|
parameters |
Query parameter definition. Consists of following attributes
(one of
TYPE:
|
parent_path |
The path to a workspace folder containing the query. Set to |
rootpath |
Root directory to which all queries are deployed to. Can also be
configured by settings LAKTORY_WORKSPACE_LAKTORY_ROOT environment
variable. Default is
TYPE:
|
run_as_mode |
Sets the "Run as" role for the object.
TYPE:
|
schema |
Name of the schema where this query will be executed.
|
tags |
Tags that will be added to the query. |
Examples:
from laktory import models
query = models.resources.databricks.Query(
display_name="google-prices",
parent_path="/queries",
query_text="SELECT * FROM dev.finance.slv_stock_prices",
warehouse_id="12345",
)
ATTRIBUTE | DESCRIPTION |
---|---|
additional_core_resources |
TYPE:
|
--
laktory.models.resources.databricks.query.QueryParameter
¤
Bases: BaseModel
Query Parameters Specifications
ATTRIBUTE | DESCRIPTION |
---|---|
name |
Literal parameter marker that appears between double curly braces in the query text.
TYPE:
|
date_range_value |
Date-range query parameter value. Consists of following attributes
(Can only specify one of |
date_value |
Date query parameter value. Consists of following attributes (Can only
specify one of
TYPE:
|
enum_value |
Dropdown parameter value
TYPE:
|
numeric_value |
Numeric parameter value |
query_backed_value |
Query-based dropdown parameter value |
text_value |
Text parameter value
TYPE:
|
title |
Text displayed in the user-facing parameter widget in the UI.
TYPE:
|
--
laktory.models.resources.databricks.query.QueryParameterDateRangeValue
¤
Bases: BaseModel
ATTRIBUTE | DESCRIPTION |
---|---|
date_range_value |
Manually specified date-time range value |
dynamic_date_range_value |
Dynamic date-time range value based on current date-time.
TYPE:
|
--
laktory.models.resources.databricks.query.QueryParameterDateRangeValueDateRangeValue
¤
--
laktory.models.resources.databricks.query.QueryParameterDateValue
¤
Bases: BaseModel
ATTRIBUTE | DESCRIPTION |
---|---|
date_value |
Manually specified date-time value
TYPE:
|
dynamic_date_value |
Dynamic date-time value based on current date-time
TYPE:
|
precision |
Date-time precision to format the value into when the query is run.
TYPE:
|
--
laktory.models.resources.databricks.query.QueryParameterEnumValue
¤
--
laktory.models.resources.databricks.query.QueryParameterEnumValueMultiValuesOptions
¤
--
laktory.models.resources.databricks.query.QueryParameterNumericValue
¤
--
laktory.models.resources.databricks.query.QueryParameterQueryBackedValue
¤
--
laktory.models.resources.databricks.query.QueryParameterQueryBackedValueMultiValuesOptions
¤
--