global_init_scripts
Creates, updates, deletes, gets or lists a global_init_scripts
resource.
Overview
Name | global_init_scripts |
Type | Resource |
Id | databricks_workspace.compute.global_init_scripts |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Response indicating that the script was retrieved successfully.
Name | Datatype | Description |
---|---|---|
name | string | |
script_id | string | |
created_at | integer | |
created_by | string | |
enabled | boolean | |
position | integer | |
script | string | |
updated_at | integer | |
updated_by | string |
Response indicating that the scripts were retrieved successfully.
Name | Datatype | Description |
---|---|---|
name | string | |
script_id | string | |
created_at | integer | |
created_by | string | |
enabled | boolean | |
position | integer | |
updated_at | integer | |
updated_by | string |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | deployment_name | Manage a specific global init script with ID | |
list | select | deployment_name | Manages global init scripts for this workspace. | |
create | insert | deployment_name | Manages global init scripts for this workspace. | |
update | update | deployment_name | Manage a specific global init script with ID | |
delete | delete | deployment_name | Manage a specific global init script with ID |
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) |
SELECT
examples
- get
- list
Manage a specific global init script with ID
SELECT
name,
script_id,
created_at,
created_by,
enabled,
position,
script,
updated_at,
updated_by
FROM databricks_workspace.compute.global_init_scripts
WHERE deployment_name = '{{ deployment_name }}' -- required;
Manages global init scripts for this workspace.
SELECT
name,
script_id,
created_at,
created_by,
enabled,
position,
updated_at,
updated_by
FROM databricks_workspace.compute.global_init_scripts
WHERE deployment_name = '{{ deployment_name }}' -- required;
INSERT
examples
- create
- Manifest
Manages global init scripts for this workspace.
INSERT INTO databricks_workspace.compute.global_init_scripts (
data__name,
data__script,
data__position,
data__enabled,
deployment_name
)
SELECT
'{{ name }}',
'{{ script }}',
'{{ position }}',
'{{ enabled }}',
'{{ deployment_name }}'
RETURNING
script_id
;
# Description fields are for documentation purposes
- name: global_init_scripts
props:
- name: deployment_name
value: string
description: Required parameter for the global_init_scripts resource.
- name: name
value: required
- name: script
value: string
- name: position
value: required
- name: enabled
value: byte
UPDATE
examples
- update
Manage a specific global init script with ID
UPDATE databricks_workspace.compute.global_init_scripts
SET
data__name = '{{ name }}',
data__script = '{{ script }}',
data__position = '{{ position }}',
data__enabled = '{{ enabled }}'
WHERE
deployment_name = '{{ deployment_name }}' --required;
DELETE
examples
- delete
Manage a specific global init script with ID
DELETE FROM databricks_workspace.compute.global_init_scripts
WHERE deployment_name = '{{ deployment_name }}' --required;