Skip to main content

sandbox_directory_entries

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

Overview​

Namesandbox_directory_entries
TypeResource
Iddatabricks_workspace.sandbox.sandbox_directory_entries

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestring
file_typestringType of a sandbox filesystem entry without following its final symlink. (SANDBOX_FILE_TYPE_DIRECTORY, SANDBOX_FILE_TYPE_FILE, SANDBOX_FILE_TYPE_OTHER, SANDBOX_FILE_TYPE_SYMLINK)
groupstring
modeinteger
modify_timestring (date-time)Nanosecond precision is preserved on the wire.
ownerstring
pathstring
permissionsstring
sizeinteger
symlink_targetstring

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectsandbox_id, path, deployment_name, workspace_domainpage_size, page_tokenLists a directory's immediate children in UTF-8 name order. Later pages may reflect concurrent

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 directory.
sandbox_idstringThe sandbox_id segment of the parent resource name (sandboxes/{sandbox_id}).
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"}})
page_sizeintegerZero uses the default of 1000; values above 1000 are clamped to 1000.
page_tokenstringThe token from a prior response. Keep parent and path unchanged between pages.

SELECT examples​

Lists a directory's immediate children in UTF-8 name order. Later pages may reflect concurrent

SELECT
name,
file_type,
group,
mode,
modify_time,
owner,
path,
permissions,
size,
symlink_target
FROM databricks_workspace.sandbox.sandbox_directory_entries
WHERE sandbox_id = '{{ sandbox_id }}' -- required
AND path = '{{ path }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND workspace_domain = '{{ workspace_domain }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;