vw_projects
Creates, updates, deletes, gets or lists a vw_projects resource.
Overview
| Name | vw_projects |
| Type | View |
| Id | databricks_workspace.postgres.vw_projects |
Fields
The following fields are returned by this view:
| Name | Datatype | Description |
|---|---|---|
name | string | The project identifier (last component of the resource path). |
create_time | string | Timestamp when the project was created. |
initial_endpoint_spec | object | Initial endpoint configuration for the project. |
spec | object | Project specification including display_name, pg_version, and default endpoint settings. |
compute_last_active_time | string | Timestamp of the last compute activity on the project. |
min_cu | number | Minimum autoscaling Compute Units for the default endpoint. |
max_cu | number | Maximum autoscaling Compute Units for the default endpoint. |
suspend_timeout_duration | string | Duration of inactivity after which the default endpoint is automatically suspended. |
display_name | string | Human-readable project name. |
enable_pg_native_login | boolean | Whether PG native password login is enabled on all endpoints in this project. |
history_retention_duration | string | Duration for retaining point-in-time recovery history across all branches. |
owner | string | Email of the project owner. |
pg_version | integer | Major Postgres version number in use. |
uid | string | System-generated unique ID for the project. |
update_time | string | Timestamp when the project was last updated. |
Required Parameters
The following parameters are required by this view:
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | The Databricks workspace deployment name. |
SELECT Examples
SELECT
name,
create_time,
initial_endpoint_spec,
spec,
compute_last_active_time,
min_cu,
max_cu,
suspend_timeout_duration,
display_name,
enable_pg_native_login,
history_retention_duration,
owner,
pg_version,
uid,
update_time
FROM databricks_workspace.postgres.vw_projects
WHERE deployment_name = '{{ deployment_name }}';
SQL Definition
- Sqlite3
- Postgres
SELECT
SPLIT_PART(name, '/', -1) AS name,
create_time,
initial_endpoint_spec,
spec,
JSON_EXTRACT(status, '$.compute_last_active_time') AS compute_last_active_time,
JSON_EXTRACT(status, '$.default_endpoint_settings.autoscaling_limit_min_cu') AS min_cu,
JSON_EXTRACT(status, '$.default_endpoint_settings.autoscaling_limit_max_cu') AS max_cu,
JSON_EXTRACT(status, '$.default_endpoint_settings.suspend_timeout_duration') AS suspend_timeout_duration,
JSON_EXTRACT(status, '$.display_name') AS display_name,
JSON_EXTRACT(status, '$.enable_pg_native_login') AS enable_pg_native_login,
JSON_EXTRACT(status, '$.history_retention_duration') AS history_retention_duration,
JSON_EXTRACT(status, '$.owner') AS owner,
JSON_EXTRACT(status, '$.pg_version') AS pg_version,
uid,
update_time
FROM databricks_workspace.postgres.projects
WHERE deployment_name = '{{ deployment_name }}'
SELECT
SPLIT_PART(name, '/', -1) AS name,
create_time,
initial_endpoint_spec,
spec,
(status::jsonb)->>'compute_last_active_time' AS compute_last_active_time,
(status::jsonb)#>>'{default_endpoint_settings,autoscaling_limit_min_cu}' AS min_cu,
(status::jsonb)#>>'{default_endpoint_settings,autoscaling_limit_max_cu}' AS max_cu,
(status::jsonb)#>>'{default_endpoint_settings,suspend_timeout_duration}' AS suspend_timeout_duration,
(status::jsonb)->>'display_name' AS display_name,
(status::jsonb)->>'enable_pg_native_login' AS enable_pg_native_login,
(status::jsonb)->>'history_retention_duration' AS history_retention_duration,
(status::jsonb)->>'owner' AS owner,
(status::jsonb)->>'pg_version' AS pg_version,
uid,
update_time
FROM databricks_workspace.postgres.projects
WHERE deployment_name = '{{ deployment_name }}'