SQL Warehouses

Package: databricks.bundles.sql_warehouses

Classes

class Channel

Configures the channel name and DBSQL version of the warehouse. CHANNEL_NAME_CUSTOM should be chosen only when dbsql_version is specified.

dbsql_version: str | None = None
name: ChannelName | None = None
classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class ChannelName
CHANNEL_NAME_PREVIEW = 'CHANNEL_NAME_PREVIEW'
CHANNEL_NAME_CURRENT = 'CHANNEL_NAME_CURRENT'
CHANNEL_NAME_PREVIOUS = 'CHANNEL_NAME_PREVIOUS'
CHANNEL_NAME_CUSTOM = 'CHANNEL_NAME_CUSTOM'
class CreateWarehouseRequestWarehouseType
TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED'
CLASSIC = 'CLASSIC'
PRO = 'PRO'
class EndpointTagPair
key: str | None = None
value: str | None = None
classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class EndpointTags
custom_tags: list[EndpointTagPair]
classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class LifecycleWithStarted
prevent_destroy: bool | None = None

Lifecycle setting to prevent the resource from being destroyed.

started: bool | None = None

Lifecycle setting to deploy the resource in started mode. Only supported for apps, clusters, and sql_warehouses in direct deployment mode.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class SpotInstancePolicy

EndpointSpotInstancePolicy configures whether the endpoint should use spot instances.

The breakdown of how the EndpointSpotInstancePolicy converts to per cloud configurations is:

Cloud

COST_OPTIMIZED

RELIABILITY_OPTIMIZED

AWS

On Demand Driver with Spot Executors

On Demand Driver and Executors

AZURE

On Demand Driver and Executors

On Demand Driver and Executors

POLICY_UNSPECIFIED = 'POLICY_UNSPECIFIED'
COST_OPTIMIZED = 'COST_OPTIMIZED'
RELIABILITY_OPTIMIZED = 'RELIABILITY_OPTIMIZED'
class SqlWarehouse

Creates a new SQL warehouse.

auto_stop_mins: int | None = None

The amount of time in minutes that a SQL warehouse must be idle (i.e., no RUNNING queries) before it is automatically stopped.

Supported values: - Must be == 0 or >= 10 mins - 0 indicates no autostop.

Defaults to 120 mins

channel: Channel | None = None

Channel Details

cluster_size: str | None = None

Size of the clusters allocated for this warehouse. Increasing the size of a spark cluster allows you to run larger queries on it. If you want to increase the number of concurrent queries, please tune max_num_clusters.

Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large - 2X-Large - 3X-Large - 4X-Large - 5X-Large

creator_name: str | None = None

warehouse creator name

enable_photon: bool | None = None

Configures whether the warehouse should use Photon optimized clusters.

Defaults to true.

enable_serverless_compute: bool | None = None

Configures whether the warehouse should use serverless compute

instance_profile_arn: str | None = None

[DEPRECATED] Deprecated. Instance profile used to pass IAM role to the cluster

lifecycle: LifecycleWithStarted | None = None

Settings that control the deployment lifecycle of the resource, such as preventing it from being destroyed.

max_num_clusters: int | None = None

Maximum number of clusters that the autoscaler will create to handle concurrent queries.

Supported values: - Must be >= min_num_clusters - Must be <= 40.

Defaults to min_clusters if unset.

min_num_clusters: int | None = None

Minimum number of available clusters that will be maintained for this SQL warehouse. Increasing this will ensure that a larger number of clusters are always running and therefore may reduce the cold start time for new queries. This is similar to reserved vs. revocable cores in a resource manager.

Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30)

Defaults to 1

name: str | None = None

Logical name for the cluster.

Supported values: - Must be unique within an org. - Must be less than 100 characters.

permissions: list[SqlWarehousePermission]

The permissions to apply to this resource.

spot_instance_policy: SpotInstancePolicy | None = None

Configurations whether the endpoint should use spot instances.

tags: EndpointTags | None = None

A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes) associated with this SQL warehouse.

Supported values: - Number of tags < 45.

warehouse_type: CreateWarehouseRequestWarehouseType | None = None

Warehouse type: PRO or CLASSIC. If you want to use serverless compute, you must set to PRO and also set the field enable_serverless_compute to true.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class SqlWarehousePermission
level: WarehousePermissionLevel

The permission level to apply. The allowed levels depend on the resource type.

group_name: str | None = None

The name of the group granted the permission level.

service_principal_name: str | None = None

The name of the service principal granted the permission level.

user_name: str | None = None

The name of the user granted the permission level.

classmethod from_dict(
value: dict,
) → Self
as_dict(
self,
) → dict
class WarehousePermissionLevel

Permission level

CAN_MANAGE = 'CAN_MANAGE'
IS_OWNER = 'IS_OWNER'
CAN_USE = 'CAN_USE'
CAN_MONITOR = 'CAN_MONITOR'
CAN_VIEW = 'CAN_VIEW'