Skip to main content

vw_workspaces

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

Overview

Namevw_workspaces
TypeView
Iddatabricks_account.provisioning.vw_workspaces

Fields

The following fields are returned by this view:

NameDatatypeDescription
account_idstringDatabricks account ID used to scope the query.
workspace_idintegerUnique numeric identifier for the workspace.
workspace_namestringHuman-readable name of the workspace.
workspace_statusstringCurrent provisioning status of the workspace (e.g. RUNNING, PROVISIONING, FAILED).
workspace_status_messagestringHuman-readable message describing the current workspace status.
cloudstringCloud provider hosting the workspace (e.g. aws, azure, gcp).
aws_regionstringAWS region where the workspace is deployed (AWS only).
locationstringCloud region or location where the workspace is deployed (Azure/GCP).
deployment_namestringSubdomain component of the workspace URL (e.g. mycompany in mycompany.azuredatabricks.net).
pricing_tierstringPricing tier of the workspace (e.g. PREMIUM, ENTERPRISE, STANDARD).
compute_modestringCompute isolation mode for the workspace.
storage_modestringStorage isolation mode for the workspace.
credentials_idstringID of the cross-account credential configuration used by this workspace (AWS only).
storage_configuration_idstringID of the root storage configuration for this workspace.
network_idstringID of the customer-managed network configuration for this workspace.
network_connectivity_config_idstringID of the network connectivity configuration for private access.
managed_services_customer_managed_key_idstringID of the customer-managed key used to encrypt managed services data.
storage_customer_managed_key_idstringID of the customer-managed key used to encrypt workspace storage.
private_access_settings_idstringID of the private access settings configuration for this workspace.
creation_timeintegerUnix timestamp (ms) when the workspace was created.
custom_tagsobjectKey-value custom tags applied to cloud resources provisioned for this workspace.
azure_subscription_idstringAzure subscription ID where the workspace is deployed (Azure only).
azure_resource_groupstringAzure resource group containing the workspace resources (Azure only).
gcp_project_idstringGCP project ID that contains the workspace resources (GCP only).
gcp_subnet_cidrstringCIDR range for the GCP managed network subnet (GCP only).
gcp_pod_ip_rangestringIP range used for GKE cluster pods (GCP only).
gcp_service_ip_rangestringIP range used for GKE cluster services (GCP only).
gke_connectivity_typestringGKE cluster connectivity type (e.g. PRIVATE_NODE_PUBLIC_MASTER, PUBLIC_NODE_PUBLIC_MASTER) (GCP only).
gke_master_ip_rangestringCIDR range for the GKE control plane (GCP only).

Required Parameters

The following parameters are required by this view:

NameDatatypeDescription
account_idstringDatabricks account ID used to scope the query.

SELECT Examples

SELECT
account_id,
workspace_id,
workspace_name,
workspace_status,
workspace_status_message,
cloud,
aws_region,
location,
deployment_name,
pricing_tier,
compute_mode,
storage_mode,
credentials_id,
storage_configuration_id,
network_id,
network_connectivity_config_id,
managed_services_customer_managed_key_id,
storage_customer_managed_key_id,
private_access_settings_id,
creation_time,
custom_tags,
azure_subscription_id,
azure_resource_group,
gcp_project_id,
gcp_subnet_cidr,
gcp_pod_ip_range,
gcp_service_ip_range,
gke_connectivity_type,
gke_master_ip_range
FROM databricks_account.provisioning.vw_workspaces
WHERE account_id = '{{ account_id }}';

SQL Definition

SELECT
w.account_id,
w.workspace_id,
w.workspace_name,
w.workspace_status,
w.workspace_status_message,
w.cloud,
w.aws_region,
w.location,
w.deployment_name,
w.pricing_tier,
w.compute_mode,
w.storage_mode,
w.credentials_id,
w.storage_configuration_id,
w.network_id,
w.network_connectivity_config_id,
w.managed_services_customer_managed_key_id,
w.storage_customer_managed_key_id,
w.private_access_settings_id,
w.creation_time,
w.custom_tags,
JSON_EXTRACT(w.azure_workspace_info, '$.subscription_id') AS azure_subscription_id,
JSON_EXTRACT(w.azure_workspace_info, '$.resource_group') AS azure_resource_group,
JSON_EXTRACT(w.cloud_resource_container, '$.gcp.project_id') AS gcp_project_id,
JSON_EXTRACT(w.gcp_managed_network_config, '$.subnet_cidr') AS gcp_subnet_cidr,
JSON_EXTRACT(w.gcp_managed_network_config, '$.gke_cluster_pod_ip_range') AS gcp_pod_ip_range,
JSON_EXTRACT(w.gcp_managed_network_config, '$.gke_cluster_service_ip_range') AS gcp_service_ip_range,
JSON_EXTRACT(w.gke_config, '$.connectivity_type') AS gke_connectivity_type,
JSON_EXTRACT(w.gke_config, '$.master_ip_range') AS gke_master_ip_range
FROM databricks_account.provisioning.workspaces w
WHERE account_id = '{{ account_id }}'