vw_endpoints
Creates, updates, deletes, gets or lists a vw_endpoints resource.
Overview
| Name | vw_endpoints |
| Type | View |
| Id | databricks_workspace.postgres.vw_endpoints |
Fields
The following fields are returned by this view:
| Name | Datatype | Description |
|---|---|---|
name | string | The endpoint identifier (last component of the resource path). |
create_time | string | Timestamp when the endpoint was created. |
project_id | string | The project identifier that owns this endpoint. |
branch_id | string | The branch identifier that owns this endpoint. |
spec | object | Endpoint specification including type, autoscaling limits, and suspension settings. |
max_cu | number | Maximum autoscaling Compute Units for the endpoint. |
min_cu | number | Minimum autoscaling Compute Units for the endpoint. |
current_state | string | Current operational state of the endpoint (e.g. ACTIVE, IDLE, INIT). |
disabled | boolean | Whether connections to the endpoint are restricted. |
endpoint_type | string | The compute endpoint type (ENDPOINT_TYPE_READ_WRITE or ENDPOINT_TYPE_READ_ONLY). |
last_active_time | string | Timestamp of the last activity on the endpoint. |
settings | object | Postgres settings for the endpoint. |
group_enable_readable_secondaries | boolean | Whether read-only connections to the read-write endpoint are allowed. |
group_max | integer | Maximum number of computes in the endpoint group. |
group_min | integer | Minimum number of computes in the endpoint group. |
host | string | Hostname for connecting to this endpoint. |
read_write_pooled_host | string | Pooled read-write hostname for the endpoint. |
uid | string | System-generated unique ID for the endpoint. |
update_time | string | Timestamp when the endpoint was last updated. |
Required Parameters
The following parameters are required by this view:
| Name | Datatype | Description |
|---|---|---|
project_id | string | The project identifier to scope the query. |
branch_id | string | The branch identifier to scope the query. |
deployment_name | string | The Databricks workspace deployment name. |
SELECT Examples
SELECT
name,
create_time,
project_id,
branch_id,
spec,
max_cu,
min_cu,
current_state,
disabled,
endpoint_type,
last_active_time,
settings,
group_enable_readable_secondaries,
group_max,
group_min,
host,
read_write_pooled_host,
uid,
update_time
FROM databricks_workspace.postgres.vw_endpoints
WHERE project_id = '{{ project_id }}'
AND branch_id = '{{ branch_id }}'
AND deployment_name = '{{ deployment_name }}';
SQL Definition
- Sqlite3
- Postgres
SELECT
SPLIT_PART(name, '/', -1) AS name,
create_time,
project_id,
branch_id,
spec,
JSON_EXTRACT(status, '$.autoscaling_limit_max_cu') AS max_cu,
JSON_EXTRACT(status, '$.autoscaling_limit_min_cu') AS min_cu,
JSON_EXTRACT(status, '$.current_state') AS current_state,
JSON_EXTRACT(status, '$.disabled') AS disabled,
JSON_EXTRACT(status, '$.endpoint_type') AS endpoint_type,
JSON_EXTRACT(status, '$.last_active_time') AS last_active_time,
JSON_EXTRACT(status, '$.settings') AS settings,
JSON_EXTRACT(status, '$.group.enable_readable_secondaries') AS group_enable_readable_secondaries,
JSON_EXTRACT(status, '$.group.max') AS group_max,
JSON_EXTRACT(status, '$.group.min') AS group_min,
JSON_EXTRACT(status, '$.hosts.host') AS host,
JSON_EXTRACT(status, '$.hosts.read_write_pooled_host') AS read_write_pooled_host,
uid,
update_time
FROM databricks_workspace.postgres.endpoints
WHERE project_id = '{{ project_id }}'
AND branch_id = '{{ branch_id }}'
AND deployment_name = '{{ deployment_name }}'
SELECT
SPLIT_PART(name, '/', -1) AS name,
create_time,
project_id,
branch_id,
spec,
(status::jsonb)->>'autoscaling_limit_max_cu' AS max_cu,
(status::jsonb)->>'autoscaling_limit_min_cu' AS min_cu,
(status::jsonb)->>'current_state' AS current_state,
(status::jsonb)->>'disabled' AS disabled,
(status::jsonb)->>'endpoint_type' AS endpoint_type,
(status::jsonb)->>'last_active_time' AS last_active_time,
(status::jsonb)->>'settings' AS settings,
(status::jsonb)#>>'{group,enable_readable_secondaries}' AS group_enable_readable_secondaries,
(status::jsonb)#>>'{group,max}' AS group_max,
(status::jsonb)#>>'{group,min}' AS group_min,
(status::jsonb)#>>'{hosts,host}' AS host,
(status::jsonb)#>>'{hosts,read_write_pooled_host}' AS read_write_pooled_host,
uid,
update_time
FROM databricks_workspace.postgres.endpoints
WHERE project_id = '{{ project_id }}'
AND branch_id = '{{ branch_id }}'
AND deployment_name = '{{ deployment_name }}'