Skip to main content

sandbox_paths

Creates, updates, deletes, gets or lists a sandbox_paths resource.

Overview​

Namesandbox_paths
TypeResource
Iddatabricks_workspace.sandbox.sandbox_paths

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
â–¶fileobjectMetadata for a sandbox filesystem entry, describing a final symlink itself.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsandbox_id, path, deployment_name, workspace_domainReturns metadata for a path without following its final symlink.
deletedeletesandbox_id, deployment_name, workspace_domainDeletes a file, symlink, or empty directory, with an option for recursive deletion. Succeeds if the
renameexecsandbox_id, deployment_name, workspace_domain, source, destinationRenames 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.

NameDatatypeDescription
deployment_namestringThe 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)
pathstringAbsolute UTF-8 path of the entry to inspect.
sandbox_idstringThe sandbox_id segment of the parent resource name (sandboxes/{sandbox_id}). Sandbox resource name, for example sandboxes/my-sandbox.
workspace_domainstringThe 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​

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​

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​

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 }}"
}'
;