instance_pools
Operations on a instance_pools
resource.
Overview
Name | instance_pools |
Type | Resource |
Id | databricks_workspace.compute.instance_pools |
Fields
Name | Datatype |
---|---|
aws_attributes | object |
default_tags | object |
disk_spec | object |
enable_elastic_disk | boolean |
idle_instance_autotermination_minutes | integer |
instance_pool_id | string |
instance_pool_name | string |
min_idle_instances | integer |
node_type_id | string |
preloaded_spark_versions | array |
state | string |
stats | object |
status | object |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | instance_pool_id, deployment_name | Retrieve the information for an instance pool based on its identifier. |
list | SELECT | deployment_name | Gets a list of instance pools with their statistics. |
create | INSERT | deployment_name | Creates a new instance pool using idle and ready-to-use cloud instances. |
delete | DELETE | deployment_name | Deletes the instance pool permanently. The idle instances in the pool are terminated asynchronously. |
edit | REPLACE | deployment_name | Modifies the configuration of an existing instance pool. |
SELECT
examples
- instance_pools (list)
- instance_pools (get)
SELECT
aws_attributes,
default_tags,
disk_spec,
enable_elastic_disk,
idle_instance_autotermination_minutes,
instance_pool_id,
instance_pool_name,
min_idle_instances,
node_type_id,
preloaded_spark_versions,
state,
stats,
status
FROM databricks_workspace.compute.instance_pools
WHERE deployment_name = '{{ deployment_name }}';
SELECT
aws_attributes,
default_tags,
disk_spec,
enable_elastic_disk,
idle_instance_autotermination_minutes,
instance_pool_id,
instance_pool_name,
min_idle_instances,
node_type_id,
preloaded_spark_versions,
state,
stats,
status
FROM databricks_workspace.compute.instance_pools
WHERE instance_pool_id = '{{ instance_pool_id }}' AND
deployment_name = '{{ deployment_name }}';
INSERT
example
Use the following StackQL query and manifest file to create a new instance_pools
resource.
- instance_pools
- Manifest
/*+ create */
INSERT INTO databricks_workspace.compute.instance_pools (
deployment_name,
data__instance_pool_name,
data__node_type_id,
data__min_idle_instances,
data__aws_attributes,
data__custom_tags
)
SELECT
'{{ deployment_name }}',
'{{ instance_pool_name }}',
'{{ node_type_id }}',
'{{ min_idle_instances }}',
'{{ aws_attributes }}',
'{{ custom_tags }}'
;
- name: your_resource_model_name
props:
- name: instance_pool_name
value: my-pool
- name: node_type_id
value: i3.xlarge
- name: min_idle_instances
value: 10
- name: aws_attributes
value:
availability: SPOT
- name: custom_tags
value:
- key: my-key
value: my-value
REPLACE
example
Replaces a instance_pools
resource.
/*+ update */
-- replace field1, field2, etc. with the fields you want to update
REPLACE databricks_workspace.compute.instance_pools
SET field1 = '{ value1 }',
field2 = '{ value2 }', ...
WHERE deployment_name = '{{ deployment_name }}';
DELETE
example
Deletes a instance_pools
resource.
/*+ delete */
DELETE FROM databricks_workspace.compute.instance_pools
WHERE deployment_name = '{{ deployment_name }}';