diff --git a/providers/src/databricks_workspace/v00.00.00000/services/postgres.yaml b/providers/src/databricks_workspace/v00.00.00000/services/postgres.yaml index c4b6a7f1..ad09d62c 100644 --- a/providers/src/databricks_workspace/v00.00.00000/services/postgres.yaml +++ b/providers/src/databricks_workspace/v00.00.00000/services/postgres.yaml @@ -15,7 +15,7 @@ servers: description: The Databricks Workspace Deployment Name default: dbc-abcd0123-a1bc paths: - /api/2.0/postgres/{parent}/branches: + /api/2.0/postgres/projects/{project_id}/branches: post: operationId: postgres_create_branch summary: Creates a new database branch in the project. @@ -24,7 +24,7 @@ paths: description: |- Creates a new database branch in the project. - :param parent: str + :param project_id: str The Project where this Branch will be created. Format: projects/{project_id} :param branch: :class:`Branch` The Branch to create. @@ -36,7 +36,7 @@ paths: :returns: :class:`Operation` parameters: - - name: parent + - name: project_id in: path required: true schema: @@ -233,7 +233,7 @@ paths: :returns: Iterator over :class:`Branch` parameters: - - name: parent + - name: project_id in: path required: true schema: @@ -274,7 +274,7 @@ paths: message: type: string x-stackql-sdk-source: PostgresAPI - /api/2.0/postgres/{parent}/databases: + /api/2.0/postgres/projects/{project_id}/branches/{branch_id}/databases: post: operationId: postgres_create_database summary: Create a Database. @@ -288,8 +288,10 @@ paths: databases. - :param parent: str - The Branch where this Database will be created. Format: projects/{project_id}/branches/{branch_id} + :param project_id: str + The unique identifier of the Postgres project. Format: projects/{project_id} + :param branch_id: str + The unique identifier of the branch where this Database will be created. Format: projects/{project_id}/branches/{branch_id} :param database: :class:`Database` The desired specification of a Database. :param database_id: str (optional) @@ -303,14 +305,22 @@ paths: :returns: :class:`Operation` parameters: - - name: parent + - name: project_id in: path required: true schema: type: string description: >- - The Branch where this Database will be created. Format: - projects/{project_id}/branches/{branch_id} + The unique identifier of the Postgres project. Format: + projects/{project_id} + - name: branch_id + in: path + required: true + schema: + type: string + description: >- + The unique identifier of the branch where this Database will be + created. Format: projects/{project_id}/branches/{branch_id} - name: database_id in: query required: false @@ -407,9 +417,10 @@ paths: description: |- List Databases. - :param parent: str - The Branch that owns this collection of databases. Format: - projects/{project_id}/branches/{branch_id} + :param project_id: str + The unique identifier of the Postgres project. Format: projects/{project_id} + :param branch_id: str + The unique identifier of the branch that owns this collection of databases. Format: projects/{project_id}/branches/{branch_id} :param page_size: int (optional) Upper bound for items returned. :param page_token: str (optional) @@ -417,14 +428,22 @@ paths: :returns: Iterator over :class:`Database` parameters: - - name: parent + - name: project_id in: path required: true schema: type: string description: >- - The Branch that owns this collection of databases. Format: - projects/{project_id}/branches/{branch_id} + The unique identifier of the Postgres project. Format: + projects/{project_id} + - name: branch_id + in: path + required: true + schema: + type: string + description: >- + The unique identifier of the branch that owns this collection of + databases. Format: projects/{project_id}/branches/{branch_id} - name: page_size in: query required: false @@ -458,7 +477,7 @@ paths: message: type: string x-stackql-sdk-source: PostgresAPI - /api/2.0/postgres/{parent}/endpoints: + /api/2.0/postgres/projects/{project_id}/branches/{branch_id}/endpoints: post: operationId: postgres_create_endpoint summary: Creates a new compute endpoint in the branch. @@ -467,8 +486,10 @@ paths: description: |- Creates a new compute endpoint in the branch. - :param parent: str - The Branch where this Endpoint will be created. Format: projects/{project_id}/branches/{branch_id} + :param project_id: str + The unique identifier of the Postgres project. Format: projects/{project_id} + :param branch_id: str + The unique identifier of the branch where this Endpoint will be created. Format: projects/{project_id}/branches/{branch_id} :param endpoint: :class:`Endpoint` The Endpoint to create. :param endpoint_id: str @@ -479,14 +500,22 @@ paths: :returns: :class:`Operation` parameters: - - name: parent + - name: project_id in: path required: true schema: type: string description: >- - The Branch where this Endpoint will be created. Format: - projects/{project_id}/branches/{branch_id} + The unique identifier of the Postgres project. Format: + projects/{project_id} + - name: branch_id + in: path + required: true + schema: + type: string + description: >- + The unique identifier of the branch where this Endpoint will be + created. Format: projects/{project_id}/branches/{branch_id} - name: endpoint_id in: query required: true @@ -746,9 +775,10 @@ paths: description: |- Returns a paginated list of compute endpoints in the branch. - :param parent: str - The Branch that owns this collection of endpoints. Format: - projects/{project_id}/branches/{branch_id} + :param project_id: str + The unique identifier of the Postgres project. Format: projects/{project_id} + :param branch_id: str + The unique identifier of the branch that owns this collection of endpoints. Format: projects/{project_id}/branches/{branch_id} :param page_size: int (optional) Upper bound for items returned. Cannot be negative. :param page_token: str (optional) @@ -756,14 +786,22 @@ paths: :returns: Iterator over :class:`Endpoint` parameters: - - name: parent + - name: project_id in: path required: true schema: type: string description: >- - The Branch that owns this collection of endpoints. Format: - projects/{project_id}/branches/{branch_id} + The unique identifier of the Postgres project. Format: + projects/{project_id} + - name: branch_id + in: path + required: true + schema: + type: string + description: >- + The unique identifier of the branch that owns this collection of + endpoints. Format: projects/{project_id}/branches/{branch_id} - name: page_size in: query required: false @@ -1127,7 +1165,7 @@ paths: message: type: string x-stackql-sdk-source: PostgresAPI - /api/2.0/postgres/{parent}/roles: + /api/2.0/postgres/projects/{project_id}/branches/{branch_id}/roles: post: operationId: postgres_create_role summary: Creates a new Postgres role in the branch. @@ -1136,8 +1174,10 @@ paths: description: |- Creates a new Postgres role in the branch. - :param parent: str - The Branch where this Role is created. Format: projects/{project_id}/branches/{branch_id} + :param project_id: str + The unique identifier of the Postgres project. Format: projects/{project_id} + :param branch_id: str + The unique identifier of the branch where this Role is created. Format: projects/{project_id}/branches/{branch_id} :param role: :class:`Role` The desired specification of a Role. :param role_id: str (optional) @@ -1151,14 +1191,22 @@ paths: :returns: :class:`Operation` parameters: - - name: parent + - name: project_id in: path required: true schema: type: string description: >- - The Branch where this Role is created. Format: - projects/{project_id}/branches/{branch_id} + The unique identifier of the Postgres project. Format: + projects/{project_id} + - name: branch_id + in: path + required: true + schema: + type: string + description: >- + The unique identifier of the branch where this Role is created. + Format: projects/{project_id}/branches/{branch_id} - name: role_id in: query required: false @@ -1350,8 +1398,10 @@ paths: description: |- Returns a paginated list of Postgres roles in the branch. - :param parent: str - The Branch that owns this collection of roles. Format: projects/{project_id}/branches/{branch_id} + :param project_id: str + The unique identifier of the Postgres project. Format: projects/{project_id} + :param branch_id: str + The unique identifier of the branch that owns this collection of roles. Format: projects/{project_id}/branches/{branch_id} :param page_size: int (optional) Upper bound for items returned. Cannot be negative. :param page_token: str (optional) @@ -1359,14 +1409,22 @@ paths: :returns: Iterator over :class:`Role` parameters: - - name: parent + - name: project_id in: path required: true schema: type: string description: >- - The Branch that owns this collection of roles. Format: - projects/{project_id}/branches/{branch_id} + The unique identifier of the Postgres project. Format: + projects/{project_id} + - name: branch_id + in: path + required: true + schema: + type: string + description: >- + The unique identifier of the branch that owns this collection of + roles. Format: projects/{project_id}/branches/{branch_id} - name: page_size in: query required: false @@ -1400,7 +1458,7 @@ paths: message: type: string x-stackql-sdk-source: PostgresAPI - /api/2.0/postgres/{name}: + /api/2.0/postgres/projects/{project_id}/branches/{branch_id}/roles/{role_id}: delete: operationId: postgres_delete_role summary: Deletes the specified Postgres role. @@ -1409,9 +1467,12 @@ paths: description: |- Deletes the specified Postgres role. - :param name: str - The full resource path of the role to delete. Format: - projects/{project_id}/branches/{branch_id}/roles/{role_id} + :param project_id: str + The unique identifier of the Postgres project. Format: projects/{project_id} + :param branch_id: str + The unique identifier of the branch. Format: projects/{project_id}/branches/{branch_id} + :param role_id: str + The unique identifier of the role to delete. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id} :param reassign_owned_to: str (optional) Reassign objects. If this is set, all objects owned by the role are reassigned to the role specified in this parameter. @@ -1420,13 +1481,29 @@ paths: :returns: :class:`Operation` parameters: - - name: name + - name: project_id in: path required: true schema: type: string description: >- - The full resource path of the role to delete. Format: + The unique identifier of the Postgres project. Format: + projects/{project_id} + - name: branch_id + in: path + required: true + schema: + type: string + description: >- + The unique identifier of the branch. Format: + projects/{project_id}/branches/{branch_id} + - name: role_id + in: path + required: true + schema: + type: string + description: >- + The unique identifier of the role to delete. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id} - name: reassign_owned_to in: query @@ -1471,19 +1548,38 @@ paths: permissions. - :param name: str - The full resource path of the role to retrieve. Format: - projects/{project_id}/branches/{branch_id}/roles/{role_id} + :param project_id: str + The unique identifier of the Postgres project. Format: projects/{project_id} + :param branch_id: str + The unique identifier of the branch. Format: projects/{project_id}/branches/{branch_id} + :param role_id: str + The unique identifier of the role to retrieve. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id} :returns: :class:`Role` parameters: - - name: name + - name: project_id + in: path + required: true + schema: + type: string + description: >- + The unique identifier of the Postgres project. Format: + projects/{project_id} + - name: branch_id + in: path + required: true + schema: + type: string + description: >- + The unique identifier of the branch. Format: + projects/{project_id}/branches/{branch_id} + - name: role_id in: path required: true schema: type: string description: >- - The full resource path of the role to retrieve. Format: + The unique identifier of the role to retrieve. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id} responses: '200': @@ -1512,27 +1608,43 @@ paths: description: |- Update a role for a branch. - :param name: str - Output only. The full resource path of the role. Format: - projects/{project_id}/branches/{branch_id}/roles/{role_id} + :param project_id: str + The unique identifier of the Postgres project. Format: projects/{project_id} + :param branch_id: str + The unique identifier of the branch. Format: projects/{project_id}/branches/{branch_id} + :param role_id: str + The unique identifier of the role to update. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id} :param role: :class:`Role` The Postgres Role to update. - - The role's `name` field is used to identify the role to update. Format: - projects/{project_id}/branches/{branch_id}/roles/{role_id} :param update_mask: FieldMask The list of fields to update in Postgres Role. If unspecified, all fields will be updated when possible. :returns: :class:`Operation` parameters: - - name: name + - name: project_id in: path required: true schema: type: string description: >- - Output only. The full resource path of the role. Format: + The unique identifier of the Postgres project. Format: + projects/{project_id} + - name: branch_id + in: path + required: true + schema: + type: string + description: >- + The unique identifier of the branch. Format: + projects/{project_id}/branches/{branch_id} + - name: role_id + in: path + required: true + schema: + type: string + description: >- + The unique identifier of the role to update. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id} - name: update_mask in: query @@ -1754,58 +1866,9 @@ paths: type: string x-enum: - READ_ONLY - description: >- - Create a collection of name/value pairs. - - - Example enumeration: - - - >>> class Color(Enum): - - ... RED = 1 - - ... BLUE = 2 - - ... GREEN = 3 - - - Access them by: - - - - attribute access: - - >>> Color.RED - - - - value lookup: - - >>> Color(1) - - - - name lookup: - - >>> Color['RED'] - - - Enumerations can be iterated over, and know how many - members they have: - - - >>> len(Color) - - 3 - - - >>> list(Color) - - [, , ] - - - Methods can be added to enumerations, and members can - have their own - - attributes -- see the documentation for details. + description: >- + The permission scope for the generated credential. Supported values: + READ_ONLY. resources: type: array items: @@ -2748,98 +2811,99 @@ components: - DATABRICKS_SUPERUSER description: Roles that the DatabaseInstanceRole can be a member of. x-stackQL-resources: - postgres_branches: - id: databricks_workspace.postgres.postgres_branches - name: postgres_branches - title: Postgres Branches + branches: + id: databricks_workspace.postgres.branches + name: branches + title: Branches methods: create: config: requestBodyTranslate: algorithm: naive operation: - $ref: '#/paths/~1api~12.0~1postgres~1{parent}~1branches/post' + $ref: '#/paths/~1api~12.0~1postgres~1projects~1{project_id}~1branches/post' response: mediaType: application/json openAPIDocKey: '200' list: operation: - $ref: '#/paths/~1api~12.0~1postgres~1{parent}~1branches/get' + $ref: '#/paths/~1api~12.0~1postgres~1projects~1{project_id}~1branches/get' response: mediaType: application/json openAPIDocKey: '200' objectKey: $.branches sqlVerbs: select: - - $ref: '#/components/x-stackQL-resources/postgres_branches/methods/list' + - $ref: '#/components/x-stackQL-resources/branches/methods/list' insert: - - $ref: '#/components/x-stackQL-resources/postgres_branches/methods/create' + - $ref: '#/components/x-stackQL-resources/branches/methods/create' update: [] delete: [] replace: [] - postgres: - id: databricks_workspace.postgres.postgres - name: postgres - title: Postgres + databases: + id: databricks_workspace.postgres.databases + name: databases + title: Databases methods: - postgres_create_database: + create_database: config: requestBodyTranslate: algorithm: naive operation: - $ref: '#/paths/~1api~12.0~1postgres~1{parent}~1databases/post' + $ref: '#/paths/~1api~12.0~1postgres~1projects~1{project_id}~1branches~1{branch_id}~1databases/post' response: mediaType: application/json openAPIDocKey: '200' - postgres_list_databases: + list_databases: operation: - $ref: '#/paths/~1api~12.0~1postgres~1{parent}~1databases/get' + $ref: '#/paths/~1api~12.0~1postgres~1projects~1{project_id}~1branches~1{branch_id}~1databases/get' response: mediaType: application/json openAPIDocKey: '200' + objectKey: $.databases sqlVerbs: select: - $ref: >- - #/components/x-stackQL-resources/postgres/methods/postgres_list_databases + #/components/x-stackQL-resources/databases/methods/list_databases insert: - $ref: >- - #/components/x-stackQL-resources/postgres/methods/postgres_create_database + #/components/x-stackQL-resources/databases/methods/create_database update: [] delete: [] replace: [] - postgres_endpoints: - id: databricks_workspace.postgres.postgres_endpoints - name: postgres_endpoints - title: Postgres Endpoints + endpoints: + id: databricks_workspace.postgres.endpoints + name: endpoints + title: Endpoints methods: create: config: requestBodyTranslate: algorithm: naive operation: - $ref: '#/paths/~1api~12.0~1postgres~1{parent}~1endpoints/post' + $ref: '#/paths/~1api~12.0~1postgres~1projects~1{project_id}~1branches~1{branch_id}~1endpoints/post' response: mediaType: application/json openAPIDocKey: '200' list: operation: - $ref: '#/paths/~1api~12.0~1postgres~1{parent}~1endpoints/get' + $ref: '#/paths/~1api~12.0~1postgres~1projects~1{project_id}~1branches~1{branch_id}~1endpoints/get' response: mediaType: application/json openAPIDocKey: '200' objectKey: $.endpoints sqlVerbs: select: - - $ref: '#/components/x-stackQL-resources/postgres_endpoints/methods/list' + - $ref: '#/components/x-stackQL-resources/endpoints/methods/list' insert: - - $ref: '#/components/x-stackQL-resources/postgres_endpoints/methods/create' + - $ref: '#/components/x-stackQL-resources/endpoints/methods/create' update: [] delete: [] replace: [] - postgres_projects: - id: databricks_workspace.postgres.postgres_projects - name: postgres_projects - title: Postgres Projects + projects: + id: databricks_workspace.postgres.projects + name: projects + title: Projects methods: create: config: @@ -2862,66 +2926,66 @@ components: requestBodyTranslate: algorithm: naive operation: - $ref: '#/paths/~1api~12.0~1postgres~1{name}/patch' + $ref: '#/paths/~1api~12.0~1postgres~1projects~1{project_id}~1branches~1{branch_id}~1roles~1{role_id}/patch' response: mediaType: application/json openAPIDocKey: '200' sqlVerbs: select: - - $ref: '#/components/x-stackQL-resources/postgres_projects/methods/list' + - $ref: '#/components/x-stackQL-resources/projects/methods/list' insert: - - $ref: '#/components/x-stackQL-resources/postgres_projects/methods/create' + - $ref: '#/components/x-stackQL-resources/projects/methods/create' update: - - $ref: '#/components/x-stackQL-resources/postgres_projects/methods/update' + - $ref: '#/components/x-stackQL-resources/projects/methods/update' delete: [] replace: [] - postgres_roles: - id: databricks_workspace.postgres.postgres_roles - name: postgres_roles - title: Postgres Roles + roles: + id: databricks_workspace.postgres.roles + name: roles + title: Roles methods: create: config: requestBodyTranslate: algorithm: naive operation: - $ref: '#/paths/~1api~12.0~1postgres~1{parent}~1roles/post' + $ref: '#/paths/~1api~12.0~1postgres~1projects~1{project_id}~1branches~1{branch_id}~1roles/post' response: mediaType: application/json openAPIDocKey: '200' list: operation: - $ref: '#/paths/~1api~12.0~1postgres~1{parent}~1roles/get' + $ref: '#/paths/~1api~12.0~1postgres~1projects~1{project_id}~1branches~1{branch_id}~1roles/get' response: mediaType: application/json openAPIDocKey: '200' objectKey: $.roles delete: operation: - $ref: '#/paths/~1api~12.0~1postgres~1{name}/delete' + $ref: '#/paths/~1api~12.0~1postgres~1projects~1{project_id}~1branches~1{branch_id}~1roles~1{role_id}/delete' response: mediaType: application/json openAPIDocKey: '200' get: operation: - $ref: '#/paths/~1api~12.0~1postgres~1{name}/get' + $ref: '#/paths/~1api~12.0~1postgres~1projects~1{project_id}~1branches~1{branch_id}~1roles~1{role_id}/get' response: mediaType: application/json openAPIDocKey: '200' sqlVerbs: select: - - $ref: '#/components/x-stackQL-resources/postgres_roles/methods/list' - - $ref: '#/components/x-stackQL-resources/postgres_roles/methods/get' + - $ref: '#/components/x-stackQL-resources/roles/methods/list' + - $ref: '#/components/x-stackQL-resources/roles/methods/get' insert: - - $ref: '#/components/x-stackQL-resources/postgres_roles/methods/create' + - $ref: '#/components/x-stackQL-resources/roles/methods/create' update: [] delete: - - $ref: '#/components/x-stackQL-resources/postgres_roles/methods/delete' + - $ref: '#/components/x-stackQL-resources/roles/methods/delete' replace: [] - postgres_credentials: - id: databricks_workspace.postgres.postgres_credentials - name: postgres_credentials - title: Postgres Credentials + credentials: + id: databricks_workspace.postgres.credentials + name: credentials + title: Credentials methods: generate: config: @@ -2933,11 +2997,487 @@ components: mediaType: application/json openAPIDocKey: '200' sqlVerbs: - select: [] + select: + - $ref: '#/components/x-stackQL-resources/credentials/methods/generate' insert: [] update: [] delete: [] replace: [] + vw_projects: + name: vw_projects + id: databricks_workspace.postgres.vw_projects + config: + docs: + fields: + - name: name + type: string + description: The project identifier (last component of the resource path). + - name: create_time + type: string + description: Timestamp when the project was created. + - name: initial_endpoint_spec + type: object + description: Initial endpoint configuration for the project. + - name: spec + type: object + description: Project specification including display_name, pg_version, and default endpoint settings. + - name: compute_last_active_time + type: string + description: Timestamp of the last compute activity on the project. + - name: min_cu + type: number + description: Minimum autoscaling Compute Units for the default endpoint. + - name: max_cu + type: number + description: Maximum autoscaling Compute Units for the default endpoint. + - name: suspend_timeout_duration + type: string + description: Duration of inactivity after which the default endpoint is automatically suspended. + - name: display_name + type: string + description: Human-readable project name. + - name: enable_pg_native_login + type: boolean + description: Whether PG native password login is enabled on all endpoints in this project. + - name: history_retention_duration + type: string + description: Duration for retaining point-in-time recovery history across all branches. + - name: owner + type: string + description: Email of the project owner. + - name: pg_version + type: integer + description: Major Postgres version number in use. + - name: uid + type: string + description: System-generated unique ID for the project. + - name: update_time + type: string + description: Timestamp when the project was last updated. + requiredParams: + - name: deployment_name + type: string + description: The Databricks workspace deployment name. + views: + select: + predicate: sqlDialect == "sqlite3" + ddl: |- + 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 }}' + fallback: + predicate: sqlDialect == "postgres" + ddl: |- + 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 }}' + vw_branches: + name: vw_branches + id: databricks_workspace.postgres.vw_branches + config: + docs: + fields: + - name: name + type: string + description: The branch identifier (last component of the resource path). + - name: create_time + type: string + description: Timestamp when the branch was created. + - name: project_id + type: string + description: The project identifier that owns this branch. + - name: spec + type: object + description: Branch specification including expiry and protection settings. + - name: branch_id + type: string + description: System-assigned branch identifier. + - name: current_state + type: string + description: Current operational state of the branch (e.g. READY, INIT). + - name: default + type: boolean + description: Whether this is the project's default branch. + - name: is_protected + type: boolean + description: Whether the branch is protected from deletion and reset. + - name: logical_size_bytes + type: integer + description: Logical size of the branch in bytes. + - name: state_change_time + type: string + description: Timestamp indicating when the current_state began. + - name: uid + type: string + description: System-generated unique ID for the branch. + - name: update_time + type: string + description: Timestamp when the branch was last updated. + requiredParams: + - name: project_id + type: string + description: The project identifier to scope the query. + - name: deployment_name + type: string + description: The Databricks workspace deployment name. + views: + select: + predicate: sqlDialect == "sqlite3" + ddl: |- + SELECT + SPLIT_PART(name, '/', -1) AS name, + create_time, + project_id, + spec, + JSON_EXTRACT(status, '$.branch_id') AS branch_id, + JSON_EXTRACT(status, '$.current_state') AS current_state, + JSON_EXTRACT(status, '$.default') AS default, + JSON_EXTRACT(status, '$.is_protected') AS is_protected, + JSON_EXTRACT(status, '$.logical_size_bytes') AS logical_size_bytes, + JSON_EXTRACT(status, '$.state_change_time') AS state_change_time, + uid, + update_time + FROM databricks_workspace.postgres.branches + WHERE project_id = '{{ project_id }}' + AND deployment_name = '{{ deployment_name }}' + fallback: + predicate: sqlDialect == "postgres" + ddl: |- + SELECT + SPLIT_PART(name, '/', -1) AS name, + create_time, + project_id, + spec, + (status::jsonb)->>'branch_id' AS branch_id, + (status::jsonb)->>'current_state' AS current_state, + (status::jsonb)->>'default' AS default, + (status::jsonb)->>'is_protected' AS is_protected, + (status::jsonb)->>'logical_size_bytes' AS logical_size_bytes, + (status::jsonb)->>'state_change_time' AS state_change_time, + uid, + update_time + FROM databricks_workspace.postgres.branches + WHERE project_id = '{{ project_id }}' + AND deployment_name = '{{ deployment_name }}' + vw_databases: + name: vw_databases + id: databricks_workspace.postgres.vw_databases + config: + docs: + fields: + - name: name + type: string + description: The database identifier (last component of the resource path). + - name: project_id + type: string + description: The project identifier that owns this database. + - name: branch_id + type: string + description: The branch identifier that owns this database. + - name: spec + type: object + description: Database specification including postgres_database name and owner role. + - name: postgres_database + type: string + description: The name of the Postgres database. + - name: role + type: string + description: The identifier of the role that owns the database (last component of the resource path). + requiredParams: + - name: project_id + type: string + description: The project identifier to scope the query. + - name: branch_id + type: string + description: The branch identifier to scope the query. + - name: deployment_name + type: string + description: The Databricks workspace deployment name. + views: + select: + predicate: sqlDialect == "sqlite3" + ddl: |- + SELECT + SPLIT_PART(name, '/', -1) AS name, + project_id, + branch_id, + spec, + JSON_EXTRACT(status, '$.postgres_database') AS postgres_database, + SPLIT_PART(JSON_EXTRACT(status, '$.role'), '/', -1) AS role + FROM databricks_workspace.postgres.databases + WHERE deployment_name = '{{ deployment_name }}' + AND project_id = '{{ project_id }}' + AND branch_id = '{{ branch_id }}' + fallback: + predicate: sqlDialect == "postgres" + ddl: |- + SELECT + SPLIT_PART(name, '/', -1) AS name, + project_id, + branch_id, + spec, + (status::jsonb)->>'postgres_database' AS postgres_database, + SPLIT_PART((status::jsonb)->>'role', '/', -1) AS role + FROM databricks_workspace.postgres.databases + WHERE deployment_name = '{{ deployment_name }}' + AND project_id = '{{ project_id }}' + AND branch_id = '{{ branch_id }}' + vw_roles: + name: vw_roles + id: databricks_workspace.postgres.vw_roles + config: + docs: + fields: + - name: name + type: string + description: The role identifier (last component of the resource path). + - name: create_time + type: string + description: Timestamp when the role was created. + - name: project_id + type: string + description: The project identifier that owns this role. + - name: branch_id + type: string + description: The branch identifier that owns this role. + - name: spec + type: object + description: Role specification including identity type, auth method, and attributes. + - name: bypassrls + type: boolean + description: Whether the role has the BYPASSRLS attribute. + - name: createdb + type: boolean + description: Whether the role has the CREATEDB attribute. + - name: createrole + type: boolean + description: Whether the role has the CREATEROLE attribute. + - name: auth_method + type: string + description: Authentication method used when connecting to Postgres. + - name: identity_type + type: string + description: The type of Databricks identity backing this role (USER, SERVICE_PRINCIPAL, GROUP). + - name: membership_roles + type: string + description: Standard roles this role is a member of (e.g. DATABRICKS_SUPERUSER). + - name: postgres_role + type: string + description: The name of the underlying Postgres role. + - name: update_time + type: string + description: Timestamp when the role was last updated. + requiredParams: + - name: project_id + type: string + description: The project identifier to scope the query. + - name: branch_id + type: string + description: The branch identifier to scope the query. + - name: deployment_name + type: string + description: The Databricks workspace deployment name. + views: + select: + predicate: sqlDialect == "sqlite3" + ddl: |- + SELECT + SPLIT_PART(name, '/', -1) AS name, + create_time, + project_id, + branch_id, + spec, + JSON_EXTRACT(status, '$.attributes.bypassrls') AS bypassrls, + JSON_EXTRACT(status, '$.attributes.createdb') AS createdb, + JSON_EXTRACT(status, '$.attributes.createrole') AS createrole, + JSON_EXTRACT(status, '$.auth_method') AS auth_method, + JSON_EXTRACT(status, '$.identity_type') AS identity_type, + JSON_EXTRACT(status, '$.membership_roles') AS membership_roles, + JSON_EXTRACT(status, '$.postgres_role') AS postgres_role, + update_time + FROM databricks_workspace.postgres.roles + WHERE project_id = '{{ project_id }}' + AND branch_id = '{{ branch_id }}' + AND deployment_name = '{{ deployment_name }}' + fallback: + predicate: sqlDialect == "postgres" + ddl: |- + SELECT + SPLIT_PART(name, '/', -1) AS name, + create_time, + project_id, + branch_id, + spec, + (status::jsonb)#>>'{attributes,bypassrls}' AS bypassrls, + (status::jsonb)#>>'{attributes,createdb}' AS createdb, + (status::jsonb)#>>'{attributes,createrole}' AS createrole, + (status::jsonb)->>'auth_method' AS auth_method, + (status::jsonb)->>'identity_type' AS identity_type, + (status::jsonb)->>'membership_roles' AS membership_roles, + (status::jsonb)->>'postgres_role' AS postgres_role, + update_time + FROM databricks_workspace.postgres.roles + WHERE project_id = '{{ project_id }}' + AND branch_id = '{{ branch_id }}' + AND deployment_name = '{{ deployment_name }}' + vw_endpoints: + name: vw_endpoints + id: databricks_workspace.postgres.vw_endpoints + config: + docs: + fields: + - name: name + type: string + description: The endpoint identifier (last component of the resource path). + - name: create_time + type: string + description: Timestamp when the endpoint was created. + - name: project_id + type: string + description: The project identifier that owns this endpoint. + - name: branch_id + type: string + description: The branch identifier that owns this endpoint. + - name: spec + type: object + description: Endpoint specification including type, autoscaling limits, and suspension settings. + - name: max_cu + type: number + description: Maximum autoscaling Compute Units for the endpoint. + - name: min_cu + type: number + description: Minimum autoscaling Compute Units for the endpoint. + - name: current_state + type: string + description: Current operational state of the endpoint (e.g. ACTIVE, IDLE, INIT). + - name: disabled + type: boolean + description: Whether connections to the endpoint are restricted. + - name: endpoint_type + type: string + description: The compute endpoint type (ENDPOINT_TYPE_READ_WRITE or ENDPOINT_TYPE_READ_ONLY). + - name: last_active_time + type: string + description: Timestamp of the last activity on the endpoint. + - name: settings + type: object + description: Postgres settings for the endpoint. + - name: group_enable_readable_secondaries + type: boolean + description: Whether read-only connections to the read-write endpoint are allowed. + - name: group_max + type: integer + description: Maximum number of computes in the endpoint group. + - name: group_min + type: integer + description: Minimum number of computes in the endpoint group. + - name: host + type: string + description: Hostname for connecting to this endpoint. + - name: read_write_pooled_host + type: string + description: Pooled read-write hostname for the endpoint. + - name: uid + type: string + description: System-generated unique ID for the endpoint. + - name: update_time + type: string + description: Timestamp when the endpoint was last updated. + requiredParams: + - name: project_id + type: string + description: The project identifier to scope the query. + - name: branch_id + type: string + description: The branch identifier to scope the query. + - name: deployment_name + type: string + description: The Databricks workspace deployment name. + views: + select: + predicate: sqlDialect == "sqlite3" + ddl: |- + 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 }}' + fallback: + predicate: sqlDialect == "postgres" + ddl: |- + 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 }}' x-stackQL-config: pagination: requestToken: