Skip to main content

vw_apps

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

Overview

Namevw_apps
TypeView
Iddatabricks_workspace.apps.vw_apps

Fields

The following fields are returned by this view:

NameDatatypeDescription
deployment_namestringWorkspace deployment name used to scope the query.
namestringUnique name of the Databricks app within the workspace.
idstringUnique identifier for the app.
descriptionstringOptional description of the app.
urlstringURL at which the app is accessible.
creatorstringUsername of the user who created the app.
create_timestringTimestamp when the app was created (ISO 8601).
updaterstringUsername of the user who last updated the app.
update_timestringTimestamp when the app was last updated (ISO 8601).
compute_sizestringCompute size tier for the app (e.g. SMALL, MEDIUM, LARGE).
budget_policy_idstringID of the budget policy explicitly assigned to this app.
effective_budget_policy_idstringID of the budget policy in effect for this app (may be inherited).
service_principal_idintegerID of the service principal used by this app.
service_principal_namestringDisplay name of the service principal used by this app.
service_principal_client_idstringOAuth client ID of the service principal used by this app.
default_source_code_pathstringDefault workspace path to the app source code.
app_statestringCurrent lifecycle state of the app (e.g. RUNNING, STOPPED, ERROR).
app_status_messagestringHuman-readable message describing the current app state.
compute_statestringCurrent state of the app compute resources (e.g. ACTIVE, STOPPING, ERROR).
compute_status_messagestringHuman-readable message describing the current compute state.
compute_active_instancesintegerNumber of active compute instances currently running for the app.
git_repo_urlstringURL of the linked Git repository (if configured).
git_repo_providerstringGit provider for the linked repository (e.g. github, gitLab, azureDevOpsServices).
active_deployment_idstringDeployment ID of the currently active deployment.
active_deployment_source_pathstringWorkspace source code path used by the active deployment.
active_deployment_modestringDeployment mode of the active deployment (e.g. SNAPSHOT, AUTO_SYNC).
active_deployment_statestringState of the active deployment (e.g. SUCCEEDED, IN_PROGRESS, FAILED).
active_deployment_messagestringHuman-readable status message for the active deployment.
active_deployment_creatorstringUsername of the user who created the active deployment.
active_deployment_create_timestringTimestamp when the active deployment was created (ISO 8601).
pending_deployment_idstringDeployment ID of the pending deployment, if one is in progress.
pending_deployment_statestringState of the pending deployment (e.g. IN_PROGRESS, FAILED).
pending_deployment_messagestringHuman-readable status message for the pending deployment.

Required Parameters

The following parameters are required by this view:

NameDatatypeDescription
deployment_namestringWorkspace deployment name used to scope the query.

SELECT Examples

SELECT
deployment_name,
name,
id,
description,
url,
creator,
create_time,
updater,
update_time,
compute_size,
budget_policy_id,
effective_budget_policy_id,
service_principal_id,
service_principal_name,
service_principal_client_id,
default_source_code_path,
app_state,
app_status_message,
compute_state,
compute_status_message,
compute_active_instances,
git_repo_url,
git_repo_provider,
active_deployment_id,
active_deployment_source_path,
active_deployment_mode,
active_deployment_state,
active_deployment_message,
active_deployment_creator,
active_deployment_create_time,
pending_deployment_id,
pending_deployment_state,
pending_deployment_message
FROM databricks_workspace.apps.vw_apps
WHERE deployment_name = '{{ deployment_name }}';

SQL Definition

SELECT
a.deployment_name,
a.name,
a.id,
a.description,
a.url,
a.creator,
a.create_time,
a.updater,
a.update_time,
a.compute_size,
a.budget_policy_id,
a.effective_budget_policy_id,
a.service_principal_id,
a.service_principal_name,
a.service_principal_client_id,
a.default_source_code_path,
JSON_EXTRACT(a.app_status, '$.state') AS app_state,
JSON_EXTRACT(a.app_status, '$.message') AS app_status_message,
JSON_EXTRACT(a.compute_status, '$.state') AS compute_state,
JSON_EXTRACT(a.compute_status, '$.message') AS compute_status_message,
JSON_EXTRACT(a.compute_status, '$.active_instances') AS compute_active_instances,
JSON_EXTRACT(a.git_repository, '$.url') AS git_repo_url,
JSON_EXTRACT(a.git_repository, '$.provider') AS git_repo_provider,
JSON_EXTRACT(a.active_deployment, '$.deployment_id') AS active_deployment_id,
JSON_EXTRACT(a.active_deployment, '$.source_code_path') AS active_deployment_source_path,
JSON_EXTRACT(a.active_deployment, '$.mode') AS active_deployment_mode,
JSON_EXTRACT(a.active_deployment, '$.status.state') AS active_deployment_state,
JSON_EXTRACT(a.active_deployment, '$.status.message') AS active_deployment_message,
JSON_EXTRACT(a.active_deployment, '$.creator') AS active_deployment_creator,
JSON_EXTRACT(a.active_deployment, '$.create_time') AS active_deployment_create_time,
JSON_EXTRACT(a.pending_deployment, '$.deployment_id') AS pending_deployment_id,
JSON_EXTRACT(a.pending_deployment, '$.status.state') AS pending_deployment_state,
JSON_EXTRACT(a.pending_deployment, '$.status.message') AS pending_deployment_message
FROM databricks_workspace.apps.apps a
WHERE deployment_name = '{{ deployment_name }}'