Create Warehouse
db_sql_warehouse_create(
name,
cluster_size,
min_num_clusters = 1,
max_num_clusters = 1,
auto_stop_mins = 30,
tags = list(),
spot_instance_policy = c("COST_OPTIMIZED", "RELIABILITY_OPTIMIZED"),
enable_photon = TRUE,
warehouse_type = c("CLASSIC", "PRO"),
enable_serverless_compute = NULL,
disable_uc = FALSE,
channel = c("CHANNEL_NAME_CURRENT", "CHANNEL_NAME_PREVIEW"),
host = db_host(),
token = db_token(),
perform_request = TRUE
)
Name of the SQL warehouse. Must be unique.
Size of the clusters allocated to the warehouse. One of
2X-Small
, X-Small
, Small
, Medium
, Large
, X-Large
, 2X-Large
,
3X-Large
, 4X-Large
.
Minimum number of clusters available when a SQL warehouse is running. The default is 1.
Maximum number of clusters available when a SQL warehouse is running. If multi-cluster load balancing is not enabled, this is limited to 1.
Time in minutes until an idle SQL warehouse terminates
all clusters and stops. Defaults to 30. For Serverless SQL warehouses
(enable_serverless_compute
= TRUE
), set this to 10.
Named list that describes the warehouse. Databricks tags all warehouse resources with these tags.
The spot policy to use for allocating instances to clusters. This field is not used if the SQL warehouse is a Serverless SQL warehouse.
Whether queries are executed on a native vectorized
engine that speeds up query execution. The default is TRUE
.
Either "CLASSIC" (default), or "PRO"
Whether this SQL warehouse is a Serverless
warehouse. To use a Serverless SQL warehouse, you must enable Serverless SQL
warehouses for the workspace. If Serverless SQL warehouses are disabled for the
workspace, the default is FALSE
If Serverless SQL warehouses are enabled for
the workspace, the default is TRUE
.
If TRUE
will use Hive Metastore (HMS). If FALSE
(default), then it will be enabled for Unity Catalog (UC).
Whether to use the current SQL warehouse compute version or the
preview version. Databricks does not recommend using preview versions for
production workloads. The default is CHANNEL_NAME_CURRENT.
Databricks workspace URL, defaults to calling db_host()
.
Databricks workspace token, defaults to calling db_token()
.
If TRUE
(default) the request is performed, if
FALSE
the httr2 request is returned without being performed.
Other Warehouse API:
db_sql_global_warehouse_get()
,
db_sql_warehouse_delete()
,
db_sql_warehouse_edit()
,
db_sql_warehouse_get()
,
db_sql_warehouse_list()
,
db_sql_warehouse_start()
,
db_sql_warehouse_stop()
,
get_and_start_warehouse()