vw_apps
Creates, updates, deletes, gets or lists a vw_apps resource.
Overview
| Name | vw_apps |
| Type | View |
| Id | databricks_workspace.apps.vw_apps |
Fields
The following fields are returned by this view:
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | Workspace deployment name used to scope the query. |
name | string | Unique name of the Databricks app within the workspace. |
id | string | Unique identifier for the app. |
description | string | Optional description of the app. |
url | string | URL at which the app is accessible. |
creator | string | Username of the user who created the app. |
create_time | string | Timestamp when the app was created (ISO 8601). |
updater | string | Username of the user who last updated the app. |
update_time | string | Timestamp when the app was last updated (ISO 8601). |
compute_size | string | Compute size tier for the app (e.g. SMALL, MEDIUM, LARGE). |
budget_policy_id | string | ID of the budget policy explicitly assigned to this app. |
effective_budget_policy_id | string | ID of the budget policy in effect for this app (may be inherited). |
service_principal_id | integer | ID of the service principal used by this app. |
service_principal_name | string | Display name of the service principal used by this app. |
service_principal_client_id | string | OAuth client ID of the service principal used by this app. |
default_source_code_path | string | Default workspace path to the app source code. |
app_state | string | Current lifecycle state of the app (e.g. RUNNING, STOPPED, ERROR). |
app_status_message | string | Human-readable message describing the current app state. |
compute_state | string | Current state of the app compute resources (e.g. ACTIVE, STOPPING, ERROR). |
compute_status_message | string | Human-readable message describing the current compute state. |
compute_active_instances | integer | Number of active compute instances currently running for the app. |
git_repo_url | string | URL of the linked Git repository (if configured). |
git_repo_provider | string | Git provider for the linked repository (e.g. github, gitLab, azureDevOpsServices). |
active_deployment_id | string | Deployment ID of the currently active deployment. |
active_deployment_source_path | string | Workspace source code path used by the active deployment. |
active_deployment_mode | string | Deployment mode of the active deployment (e.g. SNAPSHOT, AUTO_SYNC). |
active_deployment_state | string | State of the active deployment (e.g. SUCCEEDED, IN_PROGRESS, FAILED). |
active_deployment_message | string | Human-readable status message for the active deployment. |
active_deployment_creator | string | Username of the user who created the active deployment. |
active_deployment_create_time | string | Timestamp when the active deployment was created (ISO 8601). |
pending_deployment_id | string | Deployment ID of the pending deployment, if one is in progress. |
pending_deployment_state | string | State of the pending deployment (e.g. IN_PROGRESS, FAILED). |
pending_deployment_message | string | Human-readable status message for the pending deployment. |
Required Parameters
The following parameters are required by this view:
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | Workspace 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
- Sqlite3
- Postgres
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 }}'
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,
a.app_status->>'state' AS app_state,
a.app_status->>'message' AS app_status_message,
a.compute_status->>'state' AS compute_state,
a.compute_status->>'message' AS compute_status_message,
(a.compute_status->>'active_instances')::integer AS compute_active_instances,
a.git_repository->>'url' AS git_repo_url,
a.git_repository->>'provider' AS git_repo_provider,
a.active_deployment->>'deployment_id' AS active_deployment_id,
a.active_deployment->>'source_code_path' AS active_deployment_source_path,
a.active_deployment->>'mode' AS active_deployment_mode,
a.active_deployment->'status'->>'state' AS active_deployment_state,
a.active_deployment->'status'->>'message' AS active_deployment_message,
a.active_deployment->>'creator' AS active_deployment_creator,
a.active_deployment->>'create_time' AS active_deployment_create_time,
a.pending_deployment->>'deployment_id' AS pending_deployment_id,
a.pending_deployment->'status'->>'state' AS pending_deployment_state,
a.pending_deployment->'status'->>'message' AS pending_deployment_message
FROM databricks_workspace.apps.apps a
WHERE deployment_name = '{{ deployment_name }}'