default_base_environments
Creates, updates, deletes, gets or lists a default_base_environments resource.
Overview
| Name | default_base_environments |
| Type | Resource |
| Id | databricks_workspace.compute.default_base_environments |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
id | string | |
name | string | |
creator_user_id | integer | |
last_updated_user_id | integer | |
base_environment_cache | array | |
base_environment_type | string | If changed, also update estore/namespaces/defaultbaseenvironments/latest.proto (CPU, GPU) |
created_timestamp | integer | |
environment | object | Note: we made ``environment`` non-internal because we need to expose its ``client`` field. All other fields should be treated as internal. |
filepath | string | |
is_default | boolean | |
last_updated_timestamp | integer | |
message | string | |
principal_ids | array | |
status | string | Create a collection of name/value pairs.<br /><br />Example enumeration:<br /><br />>>> class Color(Enum):<br />... RED = 1<br />... BLUE = 2<br />... GREEN = 3<br /><br />Access them by:<br /><br />- attribute access:<br /><br /> >>> Color.RED<br /> <Color.RED: 1><br /><br />- value lookup:<br /><br /> >>> Color(1)<br /> <Color.RED: 1><br /><br />- name lookup:<br /><br /> >>> Color['RED']<br /> <Color.RED: 1><br /><br />Enumerations can be iterated over, and know how many members they have:<br /><br />>>> len(Color)<br />3<br /><br />>>> list(Color)<br />[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]<br /><br />Methods can be added to enumerations, and members can have their own<br />attributes -- see the documentation for details. (CREATED, EXPIRED, FAILED, INVALID, PENDING, REFRESHING) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | deployment_name | page_size, page_token | List default base environments defined in the workspaces for the requested user. |
create | insert | deployment_name, default_base_environment | Create a default base environment within workspaces to define the environment version and a list of | |
update | update | id, deployment_name, default_base_environment | Update the default base environment for the given ID. This process will asynchronously regenerate the | |
delete | delete | id, deployment_name | Delete the default base environment given an ID. The default base environment may be used by | |
refresh | exec | deployment_name, ids | Refresh the cached default base environments for the given IDs. This process will asynchronously | |
set_default | exec | deployment_name | Set the default base environment for the workspace. This marks the specified DBE as the workspace |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
id | string | |
page_size | integer | |
page_token | string |
SELECT examples
- list
List default base environments defined in the workspaces for the requested user.
SELECT
id,
name,
creator_user_id,
last_updated_user_id,
base_environment_cache,
base_environment_type,
created_timestamp,
environment,
filepath,
is_default,
last_updated_timestamp,
message,
principal_ids,
status
FROM databricks_workspace.compute.default_base_environments
WHERE deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create
- Manifest
Create a default base environment within workspaces to define the environment version and a list of
INSERT INTO databricks_workspace.compute.default_base_environments (
default_base_environment,
request_id,
workspace_base_environment_id,
deployment_name
)
SELECT
'{{ default_base_environment }}' /* required */,
'{{ request_id }}',
'{{ workspace_base_environment_id }}',
'{{ deployment_name }}'
RETURNING
id,
name,
creator_user_id,
last_updated_user_id,
base_environment_cache,
base_environment_type,
created_timestamp,
environment,
filepath,
is_default,
last_updated_timestamp,
message,
principal_ids,
status
;
# Description fields are for documentation purposes
- name: default_base_environments
props:
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the default_base_environments resource.
- name: default_base_environment
value:
base_environment_cache:
- indefinite_materialized_environment:
last_updated_timestamp: {{ last_updated_timestamp }}
materialized_environment:
last_updated_timestamp: {{ last_updated_timestamp }}
message: "{{ message }}"
status: "{{ status }}"
base_environment_type: "{{ base_environment_type }}"
created_timestamp: {{ created_timestamp }}
creator_user_id: {{ creator_user_id }}
environment:
base_environment: "{{ base_environment }}"
client: "{{ client }}"
dependencies:
- "{{ dependencies }}"
environment_version: "{{ environment_version }}"
java_dependencies:
- "{{ java_dependencies }}"
filepath: "{{ filepath }}"
id: "{{ id }}"
is_default: {{ is_default }}
last_updated_timestamp: {{ last_updated_timestamp }}
last_updated_user_id: {{ last_updated_user_id }}
message: "{{ message }}"
name: "{{ name }}"
principal_ids:
- {{ principal_ids }}
status: "{{ status }}"
- name: request_id
value: "{{ request_id }}"
description: |
A unique identifier for this request. A random UUID is recommended. This request is only idempotent if a ``request_id`` is provided.
- name: workspace_base_environment_id
value: "{{ workspace_base_environment_id }}"
UPDATE examples
- update
Update the default base environment for the given ID. This process will asynchronously regenerate the
UPDATE databricks_workspace.compute.default_base_environments
SET
default_base_environment = '{{ default_base_environment }}'
WHERE
id = '{{ id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND default_base_environment = '{{ default_base_environment }}' --required
RETURNING
id,
name,
creator_user_id,
last_updated_user_id,
base_environment_cache,
base_environment_type,
created_timestamp,
environment,
filepath,
is_default,
last_updated_timestamp,
message,
principal_ids,
status;
DELETE examples
- delete
Delete the default base environment given an ID. The default base environment may be used by
DELETE FROM databricks_workspace.compute.default_base_environments
WHERE id = '{{ id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;
Lifecycle Methods
- refresh
- set_default
Refresh the cached default base environments for the given IDs. This process will asynchronously
EXEC databricks_workspace.compute.default_base_environments.refresh
@deployment_name='{{ deployment_name }}' --required
@@json=
'{
"ids": "{{ ids }}"
}'
;
Set the default base environment for the workspace. This marks the specified DBE as the workspace
EXEC databricks_workspace.compute.default_base_environments.set_default
@deployment_name='{{ deployment_name }}' --required
@@json=
'{
"base_environment_type": "{{ base_environment_type }}",
"id": "{{ id }}"
}'
;