Skip to main content

workspace_status

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

Overview​

Nameworkspace_status
TypeResource
Iddatabricks_workspace.workspace.workspace_status

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
object_idintegerUnique identifier for the object.
resource_idstringA unique identifier for the object that is consistent across all Databricks APIs.
created_atintegerOnly applicable to files. The creation UTC timestamp.
▶directory_infoobjectAdditional metadata about the directory. Only set for objects of type ``DIRECTORY``.
languagestringThe language of the object. This value is set only if the object type is ``NOTEBOOK``. For Jupyter (.ipynb) notebooks, this is always ``PYTHON``. (PYTHON, R, SCALA, SQL)
modified_atintegerOnly applicable to files, the last modified UTC timestamp.
object_typestringThe type of the object in workspace. - ``NOTEBOOK``: document that contains runnable code, visualizations, and explanatory text. - ``DIRECTORY``: directory - ``LIBRARY``: library - ``FILE``: file - ``REPO``: repository - ``DASHBOARD``: Lakeview dashboard (DASHBOARD, DIRECTORY, FILE, LIBRARY, NOTEBOOK, REPO)
pathstringThe absolute path of the object.
sizeintegerOnly applicable to files. The file size in bytes can be returned.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectpath, deployment_nameGets the status of an object or a directory. If path does not exist, this call returns an error

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 (default: dbc-abcd0123-a1bc)
pathstringThe absolute path of the notebook or directory.

SELECT examples​

Gets the status of an object or a directory. If path does not exist, this call returns an error

SELECT
object_id,
resource_id,
created_at,
directory_info,
language,
modified_at,
object_type,
path,
size
FROM databricks_workspace.workspace.workspace_status
WHERE path = '{{ path }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;