sandbox_paths
Creates, updates, deletes, gets or lists a sandbox_paths resource.
Overview​
| Name | sandbox_paths |
| Type | Resource |
| Id | databricks_workspace.sandbox.sandbox_paths |
Fields​
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
file | object | Metadata for a sandbox filesystem entry, describing a final symlink itself. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | sandbox_id, path, deployment_name, workspace_domain | Returns metadata for a path without following its final symlink. | |
delete | delete | sandbox_id, deployment_name, workspace_domain | Deletes a file, symlink, or empty directory, with an option for recursive deletion. Succeeds if the | |
rename | exec | sandbox_id, deployment_name, workspace_domain, source, destination | Renames a path within a sandbox. The destination must be absent and on the same filesystem. |
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: the host prefix of the workspace URL (dbc-abcd0123-a1bc on AWS, adb-1234567890123456.7 on Azure, 1234567890123456.7 on GCP). Set DATABRICKS_DEPLOYMENT_NAME to default it for the session. (default: dbc-abcd0123-a1bc, x-stackQL-envVar: DATABRICKS_DEPLOYMENT_NAME) |
path | string | Absolute UTF-8 path of the entry to inspect. |
sandbox_id | string | The sandbox_id segment of the parent resource name (sandboxes/{sandbox_id}). Sandbox resource name, for example sandboxes/my-sandbox. |
workspace_domain | string | The Databricks workspace domain suffix for the cloud. Selected by DATABRICKS_CLOUD (aws, azure or gcp; default aws). (default: cloud.databricks.com, x-stackQL-envVarSelector: {"envVar":"DATABRICKS_CLOUD","default":"aws","values":{"aws":"cloud.databricks.com","azure":"azuredatabricks.net","gcp":"gcp.databricks.com"}}) |
SELECT examples​
- get
Returns metadata for a path without following its final symlink.
SELECT
file
FROM databricks_workspace.sandbox.sandbox_paths
WHERE sandbox_id = '{{ sandbox_id }}' -- required
AND path = '{{ path }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND workspace_domain = '{{ workspace_domain }}' -- required
;
DELETE examples​
- delete
Deletes a file, symlink, or empty directory, with an option for recursive deletion. Succeeds if the
DELETE FROM databricks_workspace.sandbox.sandbox_paths
WHERE sandbox_id = '{{ sandbox_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND workspace_domain = '{{ workspace_domain }}' --required
;
Lifecycle Methods​
- rename
Renames a path within a sandbox. The destination must be absent and on the same filesystem.
EXEC databricks_workspace.sandbox.sandbox_paths.rename
@sandbox_id='{{ sandbox_id }}' --required,
@deployment_name='{{ deployment_name }}' --required,
@workspace_domain='{{ workspace_domain }}' --required
@@json=
'{
"source": "{{ source }}",
"destination": "{{ destination }}"
}'
;