From 1321bce0b4b072ad196284b626d04ebeb9dab221 Mon Sep 17 00:00:00 2001 From: "databricks-ci-ghec-2[bot]" <184307802+databricks-ci-ghec-2[bot]@users.noreply.github.com> Date: Thu, 5 Feb 2026 11:26:09 +0000 Subject: [PATCH] Update SDK to 39ab3fb529b0cca686c714aa7f9af641924697f7 --- .codegen/_openapi_sha | 2 +- NEXT_CHANGELOG.md | 6 +++ databricks/sdk/__init__.py | 1 + databricks/sdk/service/catalog.py | 2 +- databricks/sdk/service/compute.py | 1 + databricks/sdk/service/postgres.py | 8 +++- databricks/sdk/service/sharing.py | 18 ++++++++ databricks/sdk/service/sql.py | 53 ++++++++++++++++++++++ docs/dbdataclasses/catalog.rst | 2 +- docs/dbdataclasses/compute.rst | 3 ++ docs/dbdataclasses/sql.rst | 4 ++ docs/workspace/sharing/recipients.rst | 8 +++- docs/workspace/sql/statement_execution.rst | 10 +++- 13 files changed, 111 insertions(+), 7 deletions(-) mode change 100644 => 100755 NEXT_CHANGELOG.md mode change 100644 => 100755 databricks/sdk/__init__.py mode change 100644 => 100755 databricks/sdk/service/sharing.py mode change 100644 => 100755 databricks/sdk/service/sql.py mode change 100644 => 100755 docs/workspace/sharing/recipients.rst mode change 100644 => 100755 docs/workspace/sql/statement_execution.rst diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index f7a09353d..de569278f 100755 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -7f3b1f42ed37e16e6beb764dfd099c29021bb5a5 \ No newline at end of file +39ab3fb529b0cca686c714aa7f9af641924697f7 \ No newline at end of file diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md old mode 100644 new mode 100755 index a492c1cd2..5460cd802 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -13,3 +13,9 @@ ### Internal Changes ### API Changes +* Add `id` field for `databricks.sdk.service.sharing.CreateRecipient`. +* Add `id` field for `databricks.sdk.service.sharing.RecipientInfo`. +* Add `id` field for `databricks.sdk.service.sharing.UpdateRecipient`. +* Add `query_tags` field for `databricks.sdk.service.sql.ExecuteStatementRequest`. +* Add `query_tags` field for `databricks.sdk.service.sql.QueryInfo`. +* Add `uc_volume_misconfigured` enum value for `databricks.sdk.service.compute.EventType`. \ No newline at end of file diff --git a/databricks/sdk/__init__.py b/databricks/sdk/__init__.py old mode 100644 new mode 100755 index 15a07d0b0..ac08336ad --- a/databricks/sdk/__init__.py +++ b/databricks/sdk/__init__.py @@ -1359,6 +1359,7 @@ def get_workspace_client(self, workspace: Workspace) -> WorkspaceClient: config.host = config.environment.deployment_url(workspace.deployment_name) config.azure_workspace_resource_id = azure.get_azure_resource_id(workspace) config.account_id = None + config.workspace_id = workspace.workspace_id config.init_auth() return WorkspaceClient(config=config) diff --git a/databricks/sdk/service/catalog.py b/databricks/sdk/service/catalog.py index 35f713f45..953a2088d 100755 --- a/databricks/sdk/service/catalog.py +++ b/databricks/sdk/service/catalog.py @@ -8785,7 +8785,7 @@ def from_dict(cls, d: Dict[str, Any]) -> Securable: class SecurableKind(Enum): - """Latest kind: CONNECTION_WORKDAY_HCM_USERNAME_PASSWORD = 293; Next id: 294""" + """Latest kind: CONNECTION_ONE_PASSWORD_EVENT_LOGS_BEARER_TOKEN = 294; Next id: 295""" TABLE_DB_STORAGE = "TABLE_DB_STORAGE" TABLE_DELTA = "TABLE_DELTA" diff --git a/databricks/sdk/service/compute.py b/databricks/sdk/service/compute.py index c2fd9c3a5..6461e2ad4 100755 --- a/databricks/sdk/service/compute.py +++ b/databricks/sdk/service/compute.py @@ -3459,6 +3459,7 @@ class EventType(Enum): SPARK_EXCEPTION = "SPARK_EXCEPTION" STARTING = "STARTING" TERMINATING = "TERMINATING" + UC_VOLUME_MISCONFIGURED = "UC_VOLUME_MISCONFIGURED" UNPINNED = "UNPINNED" UPSIZE_COMPLETED = "UPSIZE_COMPLETED" diff --git a/databricks/sdk/service/postgres.py b/databricks/sdk/service/postgres.py index a899719f9..16f33cf8a 100755 --- a/databricks/sdk/service/postgres.py +++ b/databricks/sdk/service/postgres.py @@ -1476,7 +1476,13 @@ class RoleRoleSpec: This expects a valid Postgres identifier as specified in the link below. https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS - Required when creating the Role.""" + Required when creating the Role. + + If you wish to create a Postgres Role backed by a managed Databricks identity, then + postgres_role must be one of the following: + + 1. user email for IdentityType.USER 2. app ID for IdentityType.SERVICE_PRINCIPAL 2. group name + for IdentityType.GROUP""" def as_dict(self) -> dict: """Serializes the RoleRoleSpec into a dictionary suitable for use as a JSON request body.""" diff --git a/databricks/sdk/service/sharing.py b/databricks/sdk/service/sharing.py old mode 100644 new mode 100755 index cd1008256..d3cbbd463 --- a/databricks/sdk/service/sharing.py +++ b/databricks/sdk/service/sharing.py @@ -1432,6 +1432,9 @@ class RecipientInfo: expiration_time: Optional[int] = None """Expiration timestamp of the token, in epoch milliseconds.""" + id: Optional[str] = None + """[Create,Update:IGN] common - id of the recipient""" + ip_access_list: Optional[IpAccessList] = None """IP Access List""" @@ -1488,6 +1491,8 @@ def as_dict(self) -> dict: body["data_recipient_global_metastore_id"] = self.data_recipient_global_metastore_id if self.expiration_time is not None: body["expiration_time"] = self.expiration_time + if self.id is not None: + body["id"] = self.id if self.ip_access_list: body["ip_access_list"] = self.ip_access_list.as_dict() if self.metastore_id is not None: @@ -1531,6 +1536,8 @@ def as_shallow_dict(self) -> dict: body["data_recipient_global_metastore_id"] = self.data_recipient_global_metastore_id if self.expiration_time is not None: body["expiration_time"] = self.expiration_time + if self.id is not None: + body["id"] = self.id if self.ip_access_list: body["ip_access_list"] = self.ip_access_list if self.metastore_id is not None: @@ -1566,6 +1573,7 @@ def from_dict(cls, d: Dict[str, Any]) -> RecipientInfo: created_by=d.get("created_by", None), data_recipient_global_metastore_id=d.get("data_recipient_global_metastore_id", None), expiration_time=d.get("expiration_time", None), + id=d.get("id", None), ip_access_list=_from_dict(d, "ip_access_list", IpAccessList), metastore_id=d.get("metastore_id", None), name=d.get("name", None), @@ -3100,6 +3108,7 @@ def create( comment: Optional[str] = None, data_recipient_global_metastore_id: Optional[str] = None, expiration_time: Optional[int] = None, + id: Optional[str] = None, ip_access_list: Optional[IpAccessList] = None, owner: Optional[str] = None, properties_kvpairs: Optional[SecurablePropertiesKvPairs] = None, @@ -3119,6 +3128,8 @@ def create( __cloud__:__region__:__metastore-uuid__. :param expiration_time: int (optional) Expiration timestamp of the token, in epoch milliseconds. + :param id: str (optional) + [Create,Update:IGN] common - id of the recipient :param ip_access_list: :class:`IpAccessList` (optional) IP Access List :param owner: str (optional) @@ -3143,6 +3154,8 @@ def create( body["data_recipient_global_metastore_id"] = data_recipient_global_metastore_id if expiration_time is not None: body["expiration_time"] = expiration_time + if id is not None: + body["id"] = id if ip_access_list is not None: body["ip_access_list"] = ip_access_list.as_dict() if name is not None: @@ -3333,6 +3346,7 @@ def update( *, comment: Optional[str] = None, expiration_time: Optional[int] = None, + id: Optional[str] = None, ip_access_list: Optional[IpAccessList] = None, new_name: Optional[str] = None, owner: Optional[str] = None, @@ -3348,6 +3362,8 @@ def update( Description about the recipient. :param expiration_time: int (optional) Expiration timestamp of the token, in epoch milliseconds. + :param id: str (optional) + [Create,Update:IGN] common - id of the recipient :param ip_access_list: :class:`IpAccessList` (optional) IP Access List :param new_name: str (optional) @@ -3367,6 +3383,8 @@ def update( body["comment"] = comment if expiration_time is not None: body["expiration_time"] = expiration_time + if id is not None: + body["id"] = id if ip_access_list is not None: body["ip_access_list"] = ip_access_list.as_dict() if new_name is not None: diff --git a/databricks/sdk/service/sql.py b/databricks/sdk/service/sql.py old mode 100644 new mode 100755 index 522049b41..b84d706ee --- a/databricks/sdk/service/sql.py +++ b/databricks/sdk/service/sql.py @@ -4951,6 +4951,9 @@ class QueryInfo: query_start_time_ms: Optional[int] = None """The time the query started.""" + query_tags: Optional[List[QueryTag]] = None + """A query execution can be optionally annotated with query tags""" + query_text: Optional[str] = None """The text of the query.""" @@ -5020,6 +5023,8 @@ def as_dict(self) -> dict: body["query_source"] = self.query_source.as_dict() if self.query_start_time_ms is not None: body["query_start_time_ms"] = self.query_start_time_ms + if self.query_tags: + body["query_tags"] = [v.as_dict() for v in self.query_tags] if self.query_text is not None: body["query_text"] = self.query_text if self.rows_produced is not None: @@ -5077,6 +5082,8 @@ def as_shallow_dict(self) -> dict: body["query_source"] = self.query_source if self.query_start_time_ms is not None: body["query_start_time_ms"] = self.query_start_time_ms + if self.query_tags: + body["query_tags"] = self.query_tags if self.query_text is not None: body["query_text"] = self.query_text if self.rows_produced is not None: @@ -5118,6 +5125,7 @@ def from_dict(cls, d: Dict[str, Any]) -> QueryInfo: query_id=d.get("query_id", None), query_source=_from_dict(d, "query_source", ExternalQuerySource), query_start_time_ms=d.get("query_start_time_ms", None), + query_tags=_repeated_dict(d, "query_tags", QueryTag), query_text=d.get("query_text", None), rows_produced=d.get("rows_produced", None), session_id=d.get("session_id", None), @@ -5618,6 +5626,40 @@ class QueryStatus(Enum): STARTED = "STARTED" +@dataclass +class QueryTag: + """* A query execution can be annotated with an optional key-value pair to allow users to attribute + the executions by key and optional value to filter by. QueryTag is the user-facing + representation.""" + + key: str + + value: Optional[str] = None + + def as_dict(self) -> dict: + """Serializes the QueryTag into a dictionary suitable for use as a JSON request body.""" + body = {} + if self.key is not None: + body["key"] = self.key + if self.value is not None: + body["value"] = self.value + return body + + def as_shallow_dict(self) -> dict: + """Serializes the QueryTag into a shallow dictionary of its immediate attributes.""" + body = {} + if self.key is not None: + body["key"] = self.key + if self.value is not None: + body["value"] = self.value + return body + + @classmethod + def from_dict(cls, d: Dict[str, Any]) -> QueryTag: + """Deserializes the QueryTag from a dictionary.""" + return cls(key=d.get("key", None), value=d.get("value", None)) + + @dataclass class RepeatedEndpointConfPairs: config_pair: Optional[List[EndpointConfPair]] = None @@ -9359,6 +9401,7 @@ def execute_statement( format: Optional[Format] = None, on_wait_timeout: Optional[ExecuteStatementRequestOnWaitTimeout] = None, parameters: Optional[List[StatementParameterListItem]] = None, + query_tags: Optional[List[QueryTag]] = None, row_limit: Optional[int] = None, schema: Optional[str] = None, wait_timeout: Optional[str] = None, @@ -9513,6 +9556,14 @@ def execute_statement( [Parameter markers]: https://docs.databricks.com/sql/language-manual/sql-ref-parameter-marker.html [`cast` function]: https://docs.databricks.com/sql/language-manual/functions/cast.html + :param query_tags: List[:class:`QueryTag`] (optional) + An array of query tags to annotate a SQL statement. A query tag consists of a non-empty key and, + optionally, a value. To represent a NULL value, either omit the `value` field or manually set it to + `null` or white space. Refer to the SQL language reference for the format specification of query + tags. There's no significance to the order of tags. Only one value per key will be recorded. A + sequence in excess of 20 query tags will be coerced to 20. Example: + + { ..., "query_tags": [ { "key": "team", "value": "eng" }, { "key": "some key only tag" } ] } :param row_limit: int (optional) Applies the given row limit to the statement's result set, but unlike the `LIMIT` clause in SQL, it also sets the `truncated` field in the response to indicate whether the result was trimmed due to @@ -9551,6 +9602,8 @@ def execute_statement( body["on_wait_timeout"] = on_wait_timeout.value if parameters is not None: body["parameters"] = [v.as_dict() for v in parameters] + if query_tags is not None: + body["query_tags"] = [v.as_dict() for v in query_tags] if row_limit is not None: body["row_limit"] = row_limit if schema is not None: diff --git a/docs/dbdataclasses/catalog.rst b/docs/dbdataclasses/catalog.rst index 04a5fa45c..49027f6dc 100755 --- a/docs/dbdataclasses/catalog.rst +++ b/docs/dbdataclasses/catalog.rst @@ -1510,7 +1510,7 @@ These dataclasses are used in the SDK to represent API requests and responses fo .. py:class:: SecurableKind - Latest kind: CONNECTION_WORKDAY_HCM_USERNAME_PASSWORD = 293; Next id: 294 + Latest kind: CONNECTION_ONE_PASSWORD_EVENT_LOGS_BEARER_TOKEN = 294; Next id: 295 .. py:attribute:: TABLE_DB_STORAGE :value: "TABLE_DB_STORAGE" diff --git a/docs/dbdataclasses/compute.rst b/docs/dbdataclasses/compute.rst index 0c60927f9..1569ceeac 100755 --- a/docs/dbdataclasses/compute.rst +++ b/docs/dbdataclasses/compute.rst @@ -522,6 +522,9 @@ These dataclasses are used in the SDK to represent API requests and responses fo .. py:attribute:: TERMINATING :value: "TERMINATING" + .. py:attribute:: UC_VOLUME_MISCONFIGURED + :value: "UC_VOLUME_MISCONFIGURED" + .. py:attribute:: UNPINNED :value: "UNPINNED" diff --git a/docs/dbdataclasses/sql.rst b/docs/dbdataclasses/sql.rst index 077becb63..835e445d2 100755 --- a/docs/dbdataclasses/sql.rst +++ b/docs/dbdataclasses/sql.rst @@ -908,6 +908,10 @@ These dataclasses are used in the SDK to represent API requests and responses fo .. py:attribute:: STARTED :value: "STARTED" +.. autoclass:: QueryTag + :members: + :undoc-members: + .. autoclass:: RepeatedEndpointConfPairs :members: :undoc-members: diff --git a/docs/workspace/sharing/recipients.rst b/docs/workspace/sharing/recipients.rst old mode 100644 new mode 100755 index e555f6d24..5002f8e96 --- a/docs/workspace/sharing/recipients.rst +++ b/docs/workspace/sharing/recipients.rst @@ -18,7 +18,7 @@ recipient follows the activation link to download the credential file, and then uses the credential file to establish a secure connection to receive the shared data. This sharing mode is called **open sharing**. - .. py:method:: create(name: str, authentication_type: AuthenticationType [, comment: Optional[str], data_recipient_global_metastore_id: Optional[str], expiration_time: Optional[int], ip_access_list: Optional[IpAccessList], owner: Optional[str], properties_kvpairs: Optional[SecurablePropertiesKvPairs], sharing_code: Optional[str]]) -> RecipientInfo + .. py:method:: create(name: str, authentication_type: AuthenticationType [, comment: Optional[str], data_recipient_global_metastore_id: Optional[str], expiration_time: Optional[int], id: Optional[str], ip_access_list: Optional[IpAccessList], owner: Optional[str], properties_kvpairs: Optional[SecurablePropertiesKvPairs], sharing_code: Optional[str]]) -> RecipientInfo Usage: @@ -50,6 +50,8 @@ __cloud__:__region__:__metastore-uuid__. :param expiration_time: int (optional) Expiration timestamp of the token, in epoch milliseconds. + :param id: str (optional) + [Create,Update:IGN] common - id of the recipient :param ip_access_list: :class:`IpAccessList` (optional) IP Access List :param owner: str (optional) @@ -212,7 +214,7 @@ :returns: :class:`GetRecipientSharePermissionsResponse` - .. py:method:: update(name: str [, comment: Optional[str], expiration_time: Optional[int], ip_access_list: Optional[IpAccessList], new_name: Optional[str], owner: Optional[str], properties_kvpairs: Optional[SecurablePropertiesKvPairs]]) -> RecipientInfo + .. py:method:: update(name: str [, comment: Optional[str], expiration_time: Optional[int], id: Optional[str], ip_access_list: Optional[IpAccessList], new_name: Optional[str], owner: Optional[str], properties_kvpairs: Optional[SecurablePropertiesKvPairs]]) -> RecipientInfo Usage: @@ -242,6 +244,8 @@ Description about the recipient. :param expiration_time: int (optional) Expiration timestamp of the token, in epoch milliseconds. + :param id: str (optional) + [Create,Update:IGN] common - id of the recipient :param ip_access_list: :class:`IpAccessList` (optional) IP Access List :param new_name: str (optional) diff --git a/docs/workspace/sql/statement_execution.rst b/docs/workspace/sql/statement_execution.rst old mode 100644 new mode 100755 index 7823048b2..77f65c858 --- a/docs/workspace/sql/statement_execution.rst +++ b/docs/workspace/sql/statement_execution.rst @@ -101,7 +101,7 @@ - .. py:method:: execute_statement(statement: str, warehouse_id: str [, byte_limit: Optional[int], catalog: Optional[str], disposition: Optional[Disposition], format: Optional[Format], on_wait_timeout: Optional[ExecuteStatementRequestOnWaitTimeout], parameters: Optional[List[StatementParameterListItem]], row_limit: Optional[int], schema: Optional[str], wait_timeout: Optional[str]]) -> StatementResponse + .. py:method:: execute_statement(statement: str, warehouse_id: str [, byte_limit: Optional[int], catalog: Optional[str], disposition: Optional[Disposition], format: Optional[Format], on_wait_timeout: Optional[ExecuteStatementRequestOnWaitTimeout], parameters: Optional[List[StatementParameterListItem]], query_tags: Optional[List[QueryTag]], row_limit: Optional[int], schema: Optional[str], wait_timeout: Optional[str]]) -> StatementResponse Execute a SQL statement and optionally await its results for a specified time. @@ -253,6 +253,14 @@ [Parameter markers]: https://docs.databricks.com/sql/language-manual/sql-ref-parameter-marker.html [`cast` function]: https://docs.databricks.com/sql/language-manual/functions/cast.html + :param query_tags: List[:class:`QueryTag`] (optional) + An array of query tags to annotate a SQL statement. A query tag consists of a non-empty key and, + optionally, a value. To represent a NULL value, either omit the `value` field or manually set it to + `null` or white space. Refer to the SQL language reference for the format specification of query + tags. There's no significance to the order of tags. Only one value per key will be recorded. A + sequence in excess of 20 query tags will be coerced to 20. Example: + + { ..., "query_tags": [ { "key": "team", "value": "eng" }, { "key": "some key only tag" } ] } :param row_limit: int (optional) Applies the given row limit to the statement's result set, but unlike the `LIMIT` clause in SQL, it also sets the `truncated` field in the response to indicate whether the result was trimmed due to