Skip to content

Warehouse

laktory.models.resources.databricks.Warehouse ¤

Bases: SqlEndpointBase

Databricks Warehouse

Examples:

import io

from laktory import models

warehouse_yaml = '''
name: default
cluster_size: 2X-Small
auto_stop_mins: 30
channel_name: CHANNEL_NAME_PREVIEW
enable_photon: true
enable_serverless_compute: true
access_controls:
- group_name: account users
  permission_level: CAN_USE
'''
warehouse = models.resources.databricks.Warehouse.model_validate_yaml(
    io.StringIO(warehouse_yaml)
)
References
BASE DESCRIPTION
auto_stop_mins

Time in minutes until an idle SQL warehouse terminates all clusters and stops. This field is optional. The default is 120, set to 0 to disable the auto stop

TYPE: int | None | VariableType DEFAULT: None

channel

TYPE: SqlEndpointChannel | None | VariableType DEFAULT: None

cluster_size

The size of the clusters allocated to the endpoint: '2X-Small', 'X-Small', 'Small', 'Medium', 'Large', 'X-Large', '2X-Large', '3X-Large', '4X-Large', '5X-Large'

TYPE: str | VariableType

data_source_id

(Deprecated, will be removed) ID of the data source for this endpoint. This is used to bind an Databricks SQL query to an endpoint

TYPE: str | None | VariableType DEFAULT: None

enable_photon

Whether to enable Photon. This field is optional and is enabled by default

TYPE: bool | None | VariableType DEFAULT: None

enable_serverless_compute

Whether this SQL warehouse is a serverless endpoint. See below for details about the default values. To avoid ambiguity, especially for organizations with many workspaces, Databricks recommends that you always set this field explicitly

TYPE: bool | None | VariableType DEFAULT: None

instance_profile_arn

TYPE: str | None | VariableType DEFAULT: None

max_num_clusters

Maximum number of clusters available when a SQL warehouse is running. This field is required. If multi-cluster load balancing is not enabled, this is default to 1

TYPE: int | None | VariableType DEFAULT: None

min_num_clusters

Minimum number of clusters available when a SQL warehouse is running. The default is 1

TYPE: int | None | VariableType DEFAULT: None

name

Name of the Databricks SQL release channel. Possible values are: CHANNEL_NAME_PREVIEW and CHANNEL_NAME_CURRENT. Default is CHANNEL_NAME_CURRENT

TYPE: str | VariableType

no_wait

Whether to skip waiting for the SQL warehouse to start after creation. Default is false. When set to true, Terraform will create the warehouse but won't wait for it to be in a running state before completing

TYPE: bool | None | VariableType DEFAULT: None

spot_instance_policy

The spot policy to use for allocating instances to clusters: COST_OPTIMIZED or RELIABILITY_OPTIMIZED. This field is optional. Default is COST_OPTIMIZED

TYPE: str | None | VariableType DEFAULT: None

tags

Databricks tags all endpoint resources with these tags

TYPE: SqlEndpointTags | None | VariableType DEFAULT: None

timeouts

TYPE: SqlEndpointTimeouts | None | VariableType DEFAULT: None

warehouse_type

SQL warehouse type. See for AWS or Azure. Set to PRO or CLASSIC. If the field enable_serverless_compute has the value true either explicitly or through the default logic (see that field above for details), the default is PRO, which is required for serverless SQL warehouses. Otherwise, the default is CLASSIC

TYPE: str | None | VariableType DEFAULT: None

LAKTORY DESCRIPTION
access_controls

Access controls list

TYPE: list[AccessControl | VariableType] | VariableType DEFAULT: []

ATTRIBUTE DESCRIPTION
additional_core_resources
  • warehouse permissions

TYPE: list

additional_core_resources property ¤

  • warehouse permissions

laktory.models.resources.databricks.warehouse.SqlEndpointChannel ¤

Bases: BaseModel

PARAMETER DESCRIPTION
dbsql_version

TYPE: str | None | VariableType DEFAULT: None

name

Name of the Databricks SQL release channel. Possible values are: CHANNEL_NAME_PREVIEW and CHANNEL_NAME_CURRENT. Default is CHANNEL_NAME_CURRENT

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.warehouse.SqlEndpointTags ¤

Bases: BaseModel

PARAMETER DESCRIPTION
custom_tags

TYPE: list[SqlEndpointTagsCustomTags] | None | VariableType DEFAULT: None


laktory.models.resources.databricks.warehouse.SqlEndpointTagsCustomTags ¤

Bases: BaseModel

PARAMETER DESCRIPTION
key

TYPE: str | VariableType

value

TYPE: str | VariableType


laktory.models.resources.databricks.warehouse.SqlEndpointTimeouts ¤

Bases: BaseModel

PARAMETER DESCRIPTION
create

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.warehouse.WarehouseLookup ¤

Bases: ResourceLookup

PARAMETER DESCRIPTION
id

The ID of the SQL warehouse.

TYPE: str | VariableType DEFAULT: None

name

Name of the SQL warehouse. Name of the SQL warehouse to search (case-sensitive). Argument only supported by Terraform IaC backend.

TYPE: str | VariableType DEFAULT: None