databricks-sdk 0.45.0__py3-none-any.whl → 0.47.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of databricks-sdk might be problematic. Click here for more details.

@@ -594,12 +594,15 @@ class GenieMessage:
594
594
  `ASKING_AI`: Waiting for the LLM to respond to the user's question. * `PENDING_WAREHOUSE`:
595
595
  Waiting for warehouse before the SQL query can start executing. * `EXECUTING_QUERY`: Executing a
596
596
  generated SQL query. Get the SQL query result by calling
597
- [getMessageQueryResult](:method:genie/getMessageQueryResult) API. * `FAILED`: The response
598
- generation or query execution failed. See `error` field. * `COMPLETED`: Message processing is
599
- completed. Results are in the `attachments` field. Get the SQL query result by calling
600
- [getMessageQueryResult](:method:genie/getMessageQueryResult) API. * `SUBMITTED`: Message has
601
- been submitted. * `QUERY_RESULT_EXPIRED`: SQL result is not available anymore. The user needs to
602
- rerun the query. * `CANCELLED`: Message has been cancelled."""
597
+ [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) API. *
598
+ `FAILED`: The response generation or query execution failed. See `error` field. * `COMPLETED`:
599
+ Message processing is completed. Results are in the `attachments` field. Get the SQL query
600
+ result by calling
601
+ [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) API. *
602
+ `SUBMITTED`: Message has been submitted. * `QUERY_RESULT_EXPIRED`: SQL result is not available
603
+ anymore. The user needs to rerun the query. Rerun the SQL query result by calling
604
+ [executeMessageAttachmentQuery](:method:genie/executeMessageAttachmentQuery) API. * `CANCELLED`:
605
+ Message has been cancelled."""
603
606
 
604
607
  user_id: Optional[int] = None
605
608
  """ID of the user who created the message"""
@@ -697,6 +700,10 @@ class GenieQueryAttachment:
697
700
  query_result_metadata: Optional[GenieResultMetadata] = None
698
701
  """Metadata associated with the query result."""
699
702
 
703
+ statement_id: Optional[str] = None
704
+ """Statement Execution API statement id. Use [Get status, manifest, and result first
705
+ chunk](:method:statementexecution/getstatement) to get the full result data."""
706
+
700
707
  title: Optional[str] = None
701
708
  """Name of the query"""
702
709
 
@@ -713,6 +720,8 @@ class GenieQueryAttachment:
713
720
  body["query"] = self.query
714
721
  if self.query_result_metadata:
715
722
  body["query_result_metadata"] = self.query_result_metadata.as_dict()
723
+ if self.statement_id is not None:
724
+ body["statement_id"] = self.statement_id
716
725
  if self.title is not None:
717
726
  body["title"] = self.title
718
727
  return body
@@ -730,6 +739,8 @@ class GenieQueryAttachment:
730
739
  body["query"] = self.query
731
740
  if self.query_result_metadata:
732
741
  body["query_result_metadata"] = self.query_result_metadata
742
+ if self.statement_id is not None:
743
+ body["statement_id"] = self.statement_id
733
744
  if self.title is not None:
734
745
  body["title"] = self.title
735
746
  return body
@@ -743,6 +754,7 @@ class GenieQueryAttachment:
743
754
  last_updated_timestamp=d.get("last_updated_timestamp", None),
744
755
  query=d.get("query", None),
745
756
  query_result_metadata=_from_dict(d, "query_result_metadata", GenieResultMetadata),
757
+ statement_id=d.get("statement_id", None),
746
758
  title=d.get("title", None),
747
759
  )
748
760
 
@@ -1062,6 +1074,7 @@ class MessageErrorType(Enum):
1062
1074
  CHAT_COMPLETION_NETWORK_EXCEPTION = "CHAT_COMPLETION_NETWORK_EXCEPTION"
1063
1075
  CONTENT_FILTER_EXCEPTION = "CONTENT_FILTER_EXCEPTION"
1064
1076
  CONTEXT_EXCEEDED_EXCEPTION = "CONTEXT_EXCEEDED_EXCEPTION"
1077
+ COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION = "COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION"
1065
1078
  COULD_NOT_GET_UC_SCHEMA_EXCEPTION = "COULD_NOT_GET_UC_SCHEMA_EXCEPTION"
1066
1079
  DEPLOYMENT_NOT_FOUND_EXCEPTION = "DEPLOYMENT_NOT_FOUND_EXCEPTION"
1067
1080
  FUNCTIONS_NOT_AVAILABLE_EXCEPTION = "FUNCTIONS_NOT_AVAILABLE_EXCEPTION"
@@ -1069,6 +1082,7 @@ class MessageErrorType(Enum):
1069
1082
  FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION = "FUNCTION_ARGUMENTS_INVALID_JSON_EXCEPTION"
1070
1083
  FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION = "FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION"
1071
1084
  FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION = "FUNCTION_CALL_MISSING_PARAMETER_EXCEPTION"
1085
+ GENERATED_SQL_QUERY_TOO_LONG_EXCEPTION = "GENERATED_SQL_QUERY_TOO_LONG_EXCEPTION"
1072
1086
  GENERIC_CHAT_COMPLETION_EXCEPTION = "GENERIC_CHAT_COMPLETION_EXCEPTION"
1073
1087
  GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION = "GENERIC_CHAT_COMPLETION_SERVICE_EXCEPTION"
1074
1088
  GENERIC_SQL_EXEC_API_CALL_EXCEPTION = "GENERIC_SQL_EXEC_API_CALL_EXCEPTION"
@@ -1083,6 +1097,7 @@ class MessageErrorType(Enum):
1083
1097
  MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION = "MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION"
1084
1098
  MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION = "MESSAGE_DELETED_WHILE_EXECUTING_EXCEPTION"
1085
1099
  MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION = "MESSAGE_UPDATED_WHILE_EXECUTING_EXCEPTION"
1100
+ MISSING_SQL_QUERY_EXCEPTION = "MISSING_SQL_QUERY_EXCEPTION"
1086
1101
  NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE = "NO_DEPLOYMENTS_AVAILABLE_TO_WORKSPACE"
1087
1102
  NO_QUERY_TO_VISUALIZE_EXCEPTION = "NO_QUERY_TO_VISUALIZE_EXCEPTION"
1088
1103
  NO_TABLES_TO_QUERY_EXCEPTION = "NO_TABLES_TO_QUERY_EXCEPTION"
@@ -1107,12 +1122,15 @@ class MessageStatus(Enum):
1107
1122
  `ASKING_AI`: Waiting for the LLM to respond to the user's question. * `PENDING_WAREHOUSE`:
1108
1123
  Waiting for warehouse before the SQL query can start executing. * `EXECUTING_QUERY`: Executing a
1109
1124
  generated SQL query. Get the SQL query result by calling
1110
- [getMessageQueryResult](:method:genie/getMessageQueryResult) API. * `FAILED`: The response
1111
- generation or query execution failed. See `error` field. * `COMPLETED`: Message processing is
1112
- completed. Results are in the `attachments` field. Get the SQL query result by calling
1113
- [getMessageQueryResult](:method:genie/getMessageQueryResult) API. * `SUBMITTED`: Message has
1114
- been submitted. * `QUERY_RESULT_EXPIRED`: SQL result is not available anymore. The user needs to
1115
- rerun the query. * `CANCELLED`: Message has been cancelled."""
1125
+ [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) API. *
1126
+ `FAILED`: The response generation or query execution failed. See `error` field. * `COMPLETED`:
1127
+ Message processing is completed. Results are in the `attachments` field. Get the SQL query
1128
+ result by calling
1129
+ [getMessageAttachmentQueryResult](:method:genie/getMessageAttachmentQueryResult) API. *
1130
+ `SUBMITTED`: Message has been submitted. * `QUERY_RESULT_EXPIRED`: SQL result is not available
1131
+ anymore. The user needs to rerun the query. Rerun the SQL query result by calling
1132
+ [executeMessageAttachmentQuery](:method:genie/executeMessageAttachmentQuery) API. * `CANCELLED`:
1133
+ Message has been cancelled."""
1116
1134
 
1117
1135
  ASKING_AI = "ASKING_AI"
1118
1136
  CANCELLED = "CANCELLED"
@@ -1917,7 +1935,8 @@ class GenieAPI:
1917
1935
  ) -> GenieGetMessageQueryResultResponse:
1918
1936
  """Execute message attachment SQL query.
1919
1937
 
1920
- Execute the SQL for a message query attachment.
1938
+ Execute the SQL for a message query attachment. Use this API when the query attachment has expired and
1939
+ needs to be re-executed.
1921
1940
 
1922
1941
  :param space_id: str
1923
1942
  Genie space ID
@@ -1945,7 +1964,7 @@ class GenieAPI:
1945
1964
  def execute_message_query(
1946
1965
  self, space_id: str, conversation_id: str, message_id: str
1947
1966
  ) -> GenieGetMessageQueryResultResponse:
1948
- """Execute SQL query in a conversation message.
1967
+ """[Deprecated] Execute SQL query in a conversation message.
1949
1968
 
1950
1969
  Execute the SQL query in the message.
1951
1970
 
@@ -2059,7 +2078,7 @@ class GenieAPI:
2059
2078
  def get_message_query_result_by_attachment(
2060
2079
  self, space_id: str, conversation_id: str, message_id: str, attachment_id: str
2061
2080
  ) -> GenieGetMessageQueryResultResponse:
2062
- """[deprecated] Get conversation message SQL query result.
2081
+ """[Deprecated] Get conversation message SQL query result.
2063
2082
 
2064
2083
  Get the result of SQL query if the message has a query attachment. This is only available if a message
2065
2084
  has a query attachment and the message status is `EXECUTING_QUERY` OR `COMPLETED`.
@@ -2088,9 +2107,9 @@ class GenieAPI:
2088
2107
  return GenieGetMessageQueryResultResponse.from_dict(res)
2089
2108
 
2090
2109
  def get_space(self, space_id: str) -> GenieSpace:
2091
- """Get details of a Genie Space.
2110
+ """Get Genie Space.
2092
2111
 
2093
- Get a Genie Space.
2112
+ Get details of a Genie Space.
2094
2113
 
2095
2114
  :param space_id: str
2096
2115
  The ID associated with the Genie space
@@ -314,12 +314,14 @@ class DirectoryEntry:
314
314
  @dataclass
315
315
  class DownloadResponse:
316
316
  content_length: Optional[int] = None
317
+ """The length of the HTTP response body in bytes."""
317
318
 
318
319
  content_type: Optional[str] = None
319
320
 
320
321
  contents: Optional[BinaryIO] = None
321
322
 
322
323
  last_modified: Optional[str] = None
324
+ """The last modified time of the file in HTTP-date (RFC 7231) format."""
323
325
 
324
326
  def as_dict(self) -> dict:
325
327
  """Serializes the DownloadResponse into a dictionary suitable for use as a JSON request body."""
@@ -430,10 +432,12 @@ class GetDirectoryMetadataResponse:
430
432
  @dataclass
431
433
  class GetMetadataResponse:
432
434
  content_length: Optional[int] = None
435
+ """The length of the HTTP response body in bytes."""
433
436
 
434
437
  content_type: Optional[str] = None
435
438
 
436
439
  last_modified: Optional[str] = None
440
+ """The last modified time of the file in HTTP-date (RFC 7231) format."""
437
441
 
438
442
  def as_dict(self) -> dict:
439
443
  """Serializes the GetMetadataResponse into a dictionary suitable for use as a JSON request body."""
@@ -846,7 +846,7 @@ class ObjectPermissions:
846
846
  @dataclass
847
847
  class PartialUpdate:
848
848
  id: Optional[str] = None
849
- """Unique ID for a user in the Databricks workspace."""
849
+ """Unique ID in the Databricks workspace."""
850
850
 
851
851
  operations: Optional[List[Patch]] = None
852
852
 
@@ -1918,8 +1918,7 @@ class User:
1918
1918
  groups: Optional[List[ComplexValue]] = None
1919
1919
 
1920
1920
  id: Optional[str] = None
1921
- """Databricks user ID. This is automatically set by Databricks. Any value provided by the client
1922
- will be ignored."""
1921
+ """Databricks user ID."""
1923
1922
 
1924
1923
  name: Optional[Name] = None
1925
1924
 
@@ -2480,7 +2479,7 @@ class AccountGroupsAPI:
2480
2479
  Partially updates the details of a group.
2481
2480
 
2482
2481
  :param id: str
2483
- Unique ID for a group in the Databricks account.
2482
+ Unique ID in the Databricks workspace.
2484
2483
  :param operations: List[:class:`Patch`] (optional)
2485
2484
  :param schemas: List[:class:`PatchSchema`] (optional)
2486
2485
  The schema of the patch request. Must be ["urn:ietf:params:scim:api:messages:2.0:PatchOp"].
@@ -2493,7 +2492,6 @@ class AccountGroupsAPI:
2493
2492
  if schemas is not None:
2494
2493
  body["schemas"] = [v.value for v in schemas]
2495
2494
  headers = {
2496
- "Accept": "application/json",
2497
2495
  "Content-Type": "application/json",
2498
2496
  }
2499
2497
 
@@ -2557,7 +2555,6 @@ class AccountGroupsAPI:
2557
2555
  if schemas is not None:
2558
2556
  body["schemas"] = [v.value for v in schemas]
2559
2557
  headers = {
2560
- "Accept": "application/json",
2561
2558
  "Content-Type": "application/json",
2562
2559
  }
2563
2560
 
@@ -2765,7 +2762,7 @@ class AccountServicePrincipalsAPI:
2765
2762
  Partially updates the details of a single service principal in the Databricks account.
2766
2763
 
2767
2764
  :param id: str
2768
- Unique ID for a service principal in the Databricks account.
2765
+ Unique ID in the Databricks workspace.
2769
2766
  :param operations: List[:class:`Patch`] (optional)
2770
2767
  :param schemas: List[:class:`PatchSchema`] (optional)
2771
2768
  The schema of the patch request. Must be ["urn:ietf:params:scim:api:messages:2.0:PatchOp"].
@@ -2778,7 +2775,6 @@ class AccountServicePrincipalsAPI:
2778
2775
  if schemas is not None:
2779
2776
  body["schemas"] = [v.value for v in schemas]
2780
2777
  headers = {
2781
- "Accept": "application/json",
2782
2778
  "Content-Type": "application/json",
2783
2779
  }
2784
2780
 
@@ -2848,7 +2844,6 @@ class AccountServicePrincipalsAPI:
2848
2844
  if schemas is not None:
2849
2845
  body["schemas"] = [v.value for v in schemas]
2850
2846
  headers = {
2851
- "Accept": "application/json",
2852
2847
  "Content-Type": "application/json",
2853
2848
  }
2854
2849
 
@@ -2912,8 +2907,7 @@ class AccountUsersAPI:
2912
2907
  External ID is not currently supported. It is reserved for future use.
2913
2908
  :param groups: List[:class:`ComplexValue`] (optional)
2914
2909
  :param id: str (optional)
2915
- Databricks user ID. This is automatically set by Databricks. Any value provided by the client will
2916
- be ignored.
2910
+ Databricks user ID.
2917
2911
  :param name: :class:`Name` (optional)
2918
2912
  :param roles: List[:class:`ComplexValue`] (optional)
2919
2913
  Corresponds to AWS instance profile/arn role.
@@ -3123,7 +3117,7 @@ class AccountUsersAPI:
3123
3117
  Partially updates a user resource by applying the supplied operations on specific user attributes.
3124
3118
 
3125
3119
  :param id: str
3126
- Unique ID for a user in the Databricks account.
3120
+ Unique ID in the Databricks workspace.
3127
3121
  :param operations: List[:class:`Patch`] (optional)
3128
3122
  :param schemas: List[:class:`PatchSchema`] (optional)
3129
3123
  The schema of the patch request. Must be ["urn:ietf:params:scim:api:messages:2.0:PatchOp"].
@@ -3136,7 +3130,6 @@ class AccountUsersAPI:
3136
3130
  if schemas is not None:
3137
3131
  body["schemas"] = [v.value for v in schemas]
3138
3132
  headers = {
3139
- "Accept": "application/json",
3140
3133
  "Content-Type": "application/json",
3141
3134
  }
3142
3135
 
@@ -3164,8 +3157,7 @@ class AccountUsersAPI:
3164
3157
  Replaces a user's information with the data supplied in request.
3165
3158
 
3166
3159
  :param id: str
3167
- Databricks user ID. This is automatically set by Databricks. Any value provided by the client will
3168
- be ignored.
3160
+ Databricks user ID.
3169
3161
  :param active: bool (optional)
3170
3162
  If this user is active
3171
3163
  :param display_name: str (optional)
@@ -3215,7 +3207,6 @@ class AccountUsersAPI:
3215
3207
  if user_name is not None:
3216
3208
  body["userName"] = user_name
3217
3209
  headers = {
3218
- "Accept": "application/json",
3219
3210
  "Content-Type": "application/json",
3220
3211
  }
3221
3212
 
@@ -3434,7 +3425,7 @@ class GroupsAPI:
3434
3425
  Partially updates the details of a group.
3435
3426
 
3436
3427
  :param id: str
3437
- Unique ID for a group in the Databricks workspace.
3428
+ Unique ID in the Databricks workspace.
3438
3429
  :param operations: List[:class:`Patch`] (optional)
3439
3430
  :param schemas: List[:class:`PatchSchema`] (optional)
3440
3431
  The schema of the patch request. Must be ["urn:ietf:params:scim:api:messages:2.0:PatchOp"].
@@ -3447,7 +3438,6 @@ class GroupsAPI:
3447
3438
  if schemas is not None:
3448
3439
  body["schemas"] = [v.value for v in schemas]
3449
3440
  headers = {
3450
- "Accept": "application/json",
3451
3441
  "Content-Type": "application/json",
3452
3442
  }
3453
3443
 
@@ -3509,7 +3499,6 @@ class GroupsAPI:
3509
3499
  if schemas is not None:
3510
3500
  body["schemas"] = [v.value for v in schemas]
3511
3501
  headers = {
3512
- "Accept": "application/json",
3513
3502
  "Content-Type": "application/json",
3514
3503
  }
3515
3504
 
@@ -3922,7 +3911,7 @@ class ServicePrincipalsAPI:
3922
3911
  Partially updates the details of a single service principal in the Databricks workspace.
3923
3912
 
3924
3913
  :param id: str
3925
- Unique ID for a service principal in the Databricks workspace.
3914
+ Unique ID in the Databricks workspace.
3926
3915
  :param operations: List[:class:`Patch`] (optional)
3927
3916
  :param schemas: List[:class:`PatchSchema`] (optional)
3928
3917
  The schema of the patch request. Must be ["urn:ietf:params:scim:api:messages:2.0:PatchOp"].
@@ -3935,7 +3924,6 @@ class ServicePrincipalsAPI:
3935
3924
  if schemas is not None:
3936
3925
  body["schemas"] = [v.value for v in schemas]
3937
3926
  headers = {
3938
- "Accept": "application/json",
3939
3927
  "Content-Type": "application/json",
3940
3928
  }
3941
3929
 
@@ -4000,7 +3988,6 @@ class ServicePrincipalsAPI:
4000
3988
  if schemas is not None:
4001
3989
  body["schemas"] = [v.value for v in schemas]
4002
3990
  headers = {
4003
- "Accept": "application/json",
4004
3991
  "Content-Type": "application/json",
4005
3992
  }
4006
3993
 
@@ -4059,8 +4046,7 @@ class UsersAPI:
4059
4046
  External ID is not currently supported. It is reserved for future use.
4060
4047
  :param groups: List[:class:`ComplexValue`] (optional)
4061
4048
  :param id: str (optional)
4062
- Databricks user ID. This is automatically set by Databricks. Any value provided by the client will
4063
- be ignored.
4049
+ Databricks user ID.
4064
4050
  :param name: :class:`Name` (optional)
4065
4051
  :param roles: List[:class:`ComplexValue`] (optional)
4066
4052
  Corresponds to AWS instance profile/arn role.
@@ -4294,7 +4280,7 @@ class UsersAPI:
4294
4280
  Partially updates a user resource by applying the supplied operations on specific user attributes.
4295
4281
 
4296
4282
  :param id: str
4297
- Unique ID for a user in the Databricks workspace.
4283
+ Unique ID in the Databricks workspace.
4298
4284
  :param operations: List[:class:`Patch`] (optional)
4299
4285
  :param schemas: List[:class:`PatchSchema`] (optional)
4300
4286
  The schema of the patch request. Must be ["urn:ietf:params:scim:api:messages:2.0:PatchOp"].
@@ -4307,7 +4293,6 @@ class UsersAPI:
4307
4293
  if schemas is not None:
4308
4294
  body["schemas"] = [v.value for v in schemas]
4309
4295
  headers = {
4310
- "Accept": "application/json",
4311
4296
  "Content-Type": "application/json",
4312
4297
  }
4313
4298
 
@@ -4356,8 +4341,7 @@ class UsersAPI:
4356
4341
  Replaces a user's information with the data supplied in request.
4357
4342
 
4358
4343
  :param id: str
4359
- Databricks user ID. This is automatically set by Databricks. Any value provided by the client will
4360
- be ignored.
4344
+ Databricks user ID.
4361
4345
  :param active: bool (optional)
4362
4346
  If this user is active
4363
4347
  :param display_name: str (optional)
@@ -4407,7 +4391,6 @@ class UsersAPI:
4407
4391
  if user_name is not None:
4408
4392
  body["userName"] = user_name
4409
4393
  headers = {
4410
- "Accept": "application/json",
4411
4394
  "Content-Type": "application/json",
4412
4395
  }
4413
4396
 
@@ -3659,6 +3659,7 @@ class PerformanceTarget(Enum):
3659
3659
  on serverless compute should be. The performance mode on the job or pipeline should map to a
3660
3660
  performance setting that is passed to Cluster Manager (see cluster-common PerformanceTarget)."""
3661
3661
 
3662
+ BALANCED = "BALANCED"
3662
3663
  COST_OPTIMIZED = "COST_OPTIMIZED"
3663
3664
  PERFORMANCE_OPTIMIZED = "PERFORMANCE_OPTIMIZED"
3664
3665
 
@@ -1192,6 +1192,7 @@ class FileParent:
1192
1192
  class FileParentType(Enum):
1193
1193
 
1194
1194
  LISTING = "LISTING"
1195
+ LISTING_RESOURCE = "LISTING_RESOURCE"
1195
1196
  PROVIDER = "PROVIDER"
1196
1197
 
1197
1198
 
@@ -2452,6 +2453,7 @@ class ListingType(Enum):
2452
2453
 
2453
2454
  class MarketplaceFileType(Enum):
2454
2455
 
2456
+ APP = "APP"
2455
2457
  EMBEDDED_NOTEBOOK = "EMBEDDED_NOTEBOOK"
2456
2458
  PROVIDER_ICON = "PROVIDER_ICON"
2457
2459