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.
- name: ChannelName | None = None¶
- 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¶
- class EndpointTags¶
- custom_tags: list[EndpointTagPair]¶
- class LifecycleWithStarted¶
- prevent_destroy: bool | None = None¶
Lifecycle setting to prevent the resource from being destroyed.
- 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
- 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
- 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.