databricks-sdk 0.32.3__py3-none-any.whl → 0.34.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.
- databricks/sdk/__init__.py +10 -0
- databricks/sdk/_base_client.py +323 -0
- databricks/sdk/core.py +25 -292
- databricks/sdk/mixins/files.py +9 -9
- databricks/sdk/service/apps.py +366 -113
- databricks/sdk/service/catalog.py +269 -7
- databricks/sdk/service/compute.py +68 -18
- databricks/sdk/service/dashboards.py +34 -11
- databricks/sdk/service/jobs.py +104 -86
- databricks/sdk/service/pipelines.py +58 -1
- databricks/sdk/service/serving.py +326 -10
- databricks/sdk/service/settings.py +573 -1
- databricks/sdk/service/sharing.py +1 -1
- databricks/sdk/service/sql.py +10 -246
- databricks/sdk/service/workspace.py +268 -107
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.32.3.dist-info → databricks_sdk-0.34.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.32.3.dist-info → databricks_sdk-0.34.0.dist-info}/RECORD +22 -21
- {databricks_sdk-0.32.3.dist-info → databricks_sdk-0.34.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.32.3.dist-info → databricks_sdk-0.34.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.32.3.dist-info → databricks_sdk-0.34.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.32.3.dist-info → databricks_sdk-0.34.0.dist-info}/top_level.txt +0 -0
databricks/sdk/service/sql.py
CHANGED
|
@@ -454,6 +454,9 @@ class CancelExecutionResponse:
|
|
|
454
454
|
|
|
455
455
|
@dataclass
|
|
456
456
|
class Channel:
|
|
457
|
+
"""Configures the channel name and DBSQL version of the warehouse. CHANNEL_NAME_CUSTOM should be
|
|
458
|
+
chosen only when `dbsql_version` is specified."""
|
|
459
|
+
|
|
457
460
|
dbsql_version: Optional[str] = None
|
|
458
461
|
|
|
459
462
|
name: Optional[ChannelName] = None
|
|
@@ -499,33 +502,9 @@ class ChannelName(Enum):
|
|
|
499
502
|
CHANNEL_NAME_CURRENT = 'CHANNEL_NAME_CURRENT'
|
|
500
503
|
CHANNEL_NAME_CUSTOM = 'CHANNEL_NAME_CUSTOM'
|
|
501
504
|
CHANNEL_NAME_PREVIEW = 'CHANNEL_NAME_PREVIEW'
|
|
502
|
-
CHANNEL_NAME_PREVIOUS = 'CHANNEL_NAME_PREVIOUS'
|
|
503
505
|
CHANNEL_NAME_UNSPECIFIED = 'CHANNEL_NAME_UNSPECIFIED'
|
|
504
506
|
|
|
505
507
|
|
|
506
|
-
@dataclass
|
|
507
|
-
class ClientCallContext:
|
|
508
|
-
"""Client code that triggered the request"""
|
|
509
|
-
|
|
510
|
-
file_name: Optional[EncodedText] = None
|
|
511
|
-
"""File name that contains the last line that triggered the request."""
|
|
512
|
-
|
|
513
|
-
line_number: Optional[int] = None
|
|
514
|
-
"""Last line number within a file or notebook cell that triggered the request."""
|
|
515
|
-
|
|
516
|
-
def as_dict(self) -> dict:
|
|
517
|
-
"""Serializes the ClientCallContext into a dictionary suitable for use as a JSON request body."""
|
|
518
|
-
body = {}
|
|
519
|
-
if self.file_name: body['file_name'] = self.file_name.as_dict()
|
|
520
|
-
if self.line_number is not None: body['line_number'] = self.line_number
|
|
521
|
-
return body
|
|
522
|
-
|
|
523
|
-
@classmethod
|
|
524
|
-
def from_dict(cls, d: Dict[str, any]) -> ClientCallContext:
|
|
525
|
-
"""Deserializes the ClientCallContext from a dictionary."""
|
|
526
|
-
return cls(file_name=_from_dict(d, 'file_name', EncodedText), line_number=d.get('line_number', None))
|
|
527
|
-
|
|
528
|
-
|
|
529
508
|
@dataclass
|
|
530
509
|
class ColumnInfo:
|
|
531
510
|
name: Optional[str] = None
|
|
@@ -850,7 +829,8 @@ class CreateWarehouseRequest:
|
|
|
850
829
|
"""The amount of time in minutes that a SQL warehouse must be idle (i.e., no RUNNING queries)
|
|
851
830
|
before it is automatically stopped.
|
|
852
831
|
|
|
853
|
-
Supported values: - Must be
|
|
832
|
+
Supported values: - Must be >= 0 mins for serverless warehouses - Must be == 0 or >= 10 mins for
|
|
833
|
+
non-serverless warehouses - 0 indicates no autostop.
|
|
854
834
|
|
|
855
835
|
Defaults to 120 mins"""
|
|
856
836
|
|
|
@@ -1615,34 +1595,6 @@ class Empty:
|
|
|
1615
1595
|
return cls()
|
|
1616
1596
|
|
|
1617
1597
|
|
|
1618
|
-
@dataclass
|
|
1619
|
-
class EncodedText:
|
|
1620
|
-
encoding: Optional[EncodedTextEncoding] = None
|
|
1621
|
-
"""Carry text data in different form."""
|
|
1622
|
-
|
|
1623
|
-
text: Optional[str] = None
|
|
1624
|
-
"""text data"""
|
|
1625
|
-
|
|
1626
|
-
def as_dict(self) -> dict:
|
|
1627
|
-
"""Serializes the EncodedText into a dictionary suitable for use as a JSON request body."""
|
|
1628
|
-
body = {}
|
|
1629
|
-
if self.encoding is not None: body['encoding'] = self.encoding.value
|
|
1630
|
-
if self.text is not None: body['text'] = self.text
|
|
1631
|
-
return body
|
|
1632
|
-
|
|
1633
|
-
@classmethod
|
|
1634
|
-
def from_dict(cls, d: Dict[str, any]) -> EncodedText:
|
|
1635
|
-
"""Deserializes the EncodedText from a dictionary."""
|
|
1636
|
-
return cls(encoding=_enum(d, 'encoding', EncodedTextEncoding), text=d.get('text', None))
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
class EncodedTextEncoding(Enum):
|
|
1640
|
-
"""Carry text data in different form."""
|
|
1641
|
-
|
|
1642
|
-
BASE64 = 'BASE64'
|
|
1643
|
-
PLAIN = 'PLAIN'
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
1598
|
@dataclass
|
|
1647
1599
|
class EndpointConfPair:
|
|
1648
1600
|
key: Optional[str] = None
|
|
@@ -3447,8 +3399,6 @@ class QueryInfo:
|
|
|
3447
3399
|
query_id: Optional[str] = None
|
|
3448
3400
|
"""The query ID."""
|
|
3449
3401
|
|
|
3450
|
-
query_source: Optional[QuerySource] = None
|
|
3451
|
-
|
|
3452
3402
|
query_start_time_ms: Optional[int] = None
|
|
3453
3403
|
"""The time the query started."""
|
|
3454
3404
|
|
|
@@ -3496,7 +3446,6 @@ class QueryInfo:
|
|
|
3496
3446
|
if self.plans_state is not None: body['plans_state'] = self.plans_state.value
|
|
3497
3447
|
if self.query_end_time_ms is not None: body['query_end_time_ms'] = self.query_end_time_ms
|
|
3498
3448
|
if self.query_id is not None: body['query_id'] = self.query_id
|
|
3499
|
-
if self.query_source: body['query_source'] = self.query_source.as_dict()
|
|
3500
3449
|
if self.query_start_time_ms is not None: body['query_start_time_ms'] = self.query_start_time_ms
|
|
3501
3450
|
if self.query_text is not None: body['query_text'] = self.query_text
|
|
3502
3451
|
if self.rows_produced is not None: body['rows_produced'] = self.rows_produced
|
|
@@ -3524,7 +3473,6 @@ class QueryInfo:
|
|
|
3524
3473
|
plans_state=_enum(d, 'plans_state', PlansState),
|
|
3525
3474
|
query_end_time_ms=d.get('query_end_time_ms', None),
|
|
3526
3475
|
query_id=d.get('query_id', None),
|
|
3527
|
-
query_source=_from_dict(d, 'query_source', QuerySource),
|
|
3528
3476
|
query_start_time_ms=d.get('query_start_time_ms', None),
|
|
3529
3477
|
query_text=d.get('query_text', None),
|
|
3530
3478
|
rows_produced=d.get('rows_produced', None),
|
|
@@ -3841,176 +3789,6 @@ class QueryPostContent:
|
|
|
3841
3789
|
tags=d.get('tags', None))
|
|
3842
3790
|
|
|
3843
3791
|
|
|
3844
|
-
@dataclass
|
|
3845
|
-
class QuerySource:
|
|
3846
|
-
alert_id: Optional[str] = None
|
|
3847
|
-
"""UUID"""
|
|
3848
|
-
|
|
3849
|
-
client_call_context: Optional[ClientCallContext] = None
|
|
3850
|
-
"""Client code that triggered the request"""
|
|
3851
|
-
|
|
3852
|
-
command_id: Optional[str] = None
|
|
3853
|
-
"""Id associated with a notebook cell"""
|
|
3854
|
-
|
|
3855
|
-
command_run_id: Optional[str] = None
|
|
3856
|
-
"""Id associated with a notebook run or execution"""
|
|
3857
|
-
|
|
3858
|
-
dashboard_id: Optional[str] = None
|
|
3859
|
-
"""UUID"""
|
|
3860
|
-
|
|
3861
|
-
dashboard_v3_id: Optional[str] = None
|
|
3862
|
-
"""UUID for Lakeview Dashboards, separate from DBSQL Dashboards (dashboard_id)"""
|
|
3863
|
-
|
|
3864
|
-
driver_info: Optional[QuerySourceDriverInfo] = None
|
|
3865
|
-
|
|
3866
|
-
entry_point: Optional[QuerySourceEntryPoint] = None
|
|
3867
|
-
"""Spark service that received and processed the query"""
|
|
3868
|
-
|
|
3869
|
-
genie_space_id: Optional[str] = None
|
|
3870
|
-
"""UUID for Genie space"""
|
|
3871
|
-
|
|
3872
|
-
is_cloud_fetch: Optional[bool] = None
|
|
3873
|
-
|
|
3874
|
-
is_databricks_sql_exec_api: Optional[bool] = None
|
|
3875
|
-
|
|
3876
|
-
job_id: Optional[str] = None
|
|
3877
|
-
|
|
3878
|
-
job_managed_by: Optional[QuerySourceJobManager] = None
|
|
3879
|
-
"""With background compute, jobs can be managed by different internal teams. When not specified,
|
|
3880
|
-
not a background compute job When specified and the value is not JOBS, it is a background
|
|
3881
|
-
compute job"""
|
|
3882
|
-
|
|
3883
|
-
notebook_id: Optional[str] = None
|
|
3884
|
-
|
|
3885
|
-
query_tags: Optional[str] = None
|
|
3886
|
-
"""String provided by a customer that'll help them identify the query"""
|
|
3887
|
-
|
|
3888
|
-
run_id: Optional[str] = None
|
|
3889
|
-
"""Id associated with a job run or execution"""
|
|
3890
|
-
|
|
3891
|
-
runnable_command_id: Optional[str] = None
|
|
3892
|
-
"""Id associated with a notebook cell run or execution"""
|
|
3893
|
-
|
|
3894
|
-
scheduled_by: Optional[QuerySourceTrigger] = None
|
|
3895
|
-
|
|
3896
|
-
serverless_channel_info: Optional[ServerlessChannelInfo] = None
|
|
3897
|
-
|
|
3898
|
-
source_query_id: Optional[str] = None
|
|
3899
|
-
"""UUID"""
|
|
3900
|
-
|
|
3901
|
-
def as_dict(self) -> dict:
|
|
3902
|
-
"""Serializes the QuerySource into a dictionary suitable for use as a JSON request body."""
|
|
3903
|
-
body = {}
|
|
3904
|
-
if self.alert_id is not None: body['alert_id'] = self.alert_id
|
|
3905
|
-
if self.client_call_context: body['client_call_context'] = self.client_call_context.as_dict()
|
|
3906
|
-
if self.command_id is not None: body['command_id'] = self.command_id
|
|
3907
|
-
if self.command_run_id is not None: body['command_run_id'] = self.command_run_id
|
|
3908
|
-
if self.dashboard_id is not None: body['dashboard_id'] = self.dashboard_id
|
|
3909
|
-
if self.dashboard_v3_id is not None: body['dashboard_v3_id'] = self.dashboard_v3_id
|
|
3910
|
-
if self.driver_info: body['driver_info'] = self.driver_info.as_dict()
|
|
3911
|
-
if self.entry_point is not None: body['entry_point'] = self.entry_point.value
|
|
3912
|
-
if self.genie_space_id is not None: body['genie_space_id'] = self.genie_space_id
|
|
3913
|
-
if self.is_cloud_fetch is not None: body['is_cloud_fetch'] = self.is_cloud_fetch
|
|
3914
|
-
if self.is_databricks_sql_exec_api is not None:
|
|
3915
|
-
body['is_databricks_sql_exec_api'] = self.is_databricks_sql_exec_api
|
|
3916
|
-
if self.job_id is not None: body['job_id'] = self.job_id
|
|
3917
|
-
if self.job_managed_by is not None: body['job_managed_by'] = self.job_managed_by.value
|
|
3918
|
-
if self.notebook_id is not None: body['notebook_id'] = self.notebook_id
|
|
3919
|
-
if self.query_tags is not None: body['query_tags'] = self.query_tags
|
|
3920
|
-
if self.run_id is not None: body['run_id'] = self.run_id
|
|
3921
|
-
if self.runnable_command_id is not None: body['runnable_command_id'] = self.runnable_command_id
|
|
3922
|
-
if self.scheduled_by is not None: body['scheduled_by'] = self.scheduled_by.value
|
|
3923
|
-
if self.serverless_channel_info:
|
|
3924
|
-
body['serverless_channel_info'] = self.serverless_channel_info.as_dict()
|
|
3925
|
-
if self.source_query_id is not None: body['source_query_id'] = self.source_query_id
|
|
3926
|
-
return body
|
|
3927
|
-
|
|
3928
|
-
@classmethod
|
|
3929
|
-
def from_dict(cls, d: Dict[str, any]) -> QuerySource:
|
|
3930
|
-
"""Deserializes the QuerySource from a dictionary."""
|
|
3931
|
-
return cls(alert_id=d.get('alert_id', None),
|
|
3932
|
-
client_call_context=_from_dict(d, 'client_call_context', ClientCallContext),
|
|
3933
|
-
command_id=d.get('command_id', None),
|
|
3934
|
-
command_run_id=d.get('command_run_id', None),
|
|
3935
|
-
dashboard_id=d.get('dashboard_id', None),
|
|
3936
|
-
dashboard_v3_id=d.get('dashboard_v3_id', None),
|
|
3937
|
-
driver_info=_from_dict(d, 'driver_info', QuerySourceDriverInfo),
|
|
3938
|
-
entry_point=_enum(d, 'entry_point', QuerySourceEntryPoint),
|
|
3939
|
-
genie_space_id=d.get('genie_space_id', None),
|
|
3940
|
-
is_cloud_fetch=d.get('is_cloud_fetch', None),
|
|
3941
|
-
is_databricks_sql_exec_api=d.get('is_databricks_sql_exec_api', None),
|
|
3942
|
-
job_id=d.get('job_id', None),
|
|
3943
|
-
job_managed_by=_enum(d, 'job_managed_by', QuerySourceJobManager),
|
|
3944
|
-
notebook_id=d.get('notebook_id', None),
|
|
3945
|
-
query_tags=d.get('query_tags', None),
|
|
3946
|
-
run_id=d.get('run_id', None),
|
|
3947
|
-
runnable_command_id=d.get('runnable_command_id', None),
|
|
3948
|
-
scheduled_by=_enum(d, 'scheduled_by', QuerySourceTrigger),
|
|
3949
|
-
serverless_channel_info=_from_dict(d, 'serverless_channel_info', ServerlessChannelInfo),
|
|
3950
|
-
source_query_id=d.get('source_query_id', None))
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
@dataclass
|
|
3954
|
-
class QuerySourceDriverInfo:
|
|
3955
|
-
bi_tool_entry: Optional[str] = None
|
|
3956
|
-
|
|
3957
|
-
driver_name: Optional[str] = None
|
|
3958
|
-
|
|
3959
|
-
simba_branding_vendor: Optional[str] = None
|
|
3960
|
-
|
|
3961
|
-
version_number: Optional[str] = None
|
|
3962
|
-
|
|
3963
|
-
def as_dict(self) -> dict:
|
|
3964
|
-
"""Serializes the QuerySourceDriverInfo into a dictionary suitable for use as a JSON request body."""
|
|
3965
|
-
body = {}
|
|
3966
|
-
if self.bi_tool_entry is not None: body['bi_tool_entry'] = self.bi_tool_entry
|
|
3967
|
-
if self.driver_name is not None: body['driver_name'] = self.driver_name
|
|
3968
|
-
if self.simba_branding_vendor is not None: body['simba_branding_vendor'] = self.simba_branding_vendor
|
|
3969
|
-
if self.version_number is not None: body['version_number'] = self.version_number
|
|
3970
|
-
return body
|
|
3971
|
-
|
|
3972
|
-
@classmethod
|
|
3973
|
-
def from_dict(cls, d: Dict[str, any]) -> QuerySourceDriverInfo:
|
|
3974
|
-
"""Deserializes the QuerySourceDriverInfo from a dictionary."""
|
|
3975
|
-
return cls(bi_tool_entry=d.get('bi_tool_entry', None),
|
|
3976
|
-
driver_name=d.get('driver_name', None),
|
|
3977
|
-
simba_branding_vendor=d.get('simba_branding_vendor', None),
|
|
3978
|
-
version_number=d.get('version_number', None))
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
class QuerySourceEntryPoint(Enum):
|
|
3982
|
-
"""Spark service that received and processed the query"""
|
|
3983
|
-
|
|
3984
|
-
DLT = 'DLT'
|
|
3985
|
-
SPARK_CONNECT = 'SPARK_CONNECT'
|
|
3986
|
-
THRIFT_SERVER = 'THRIFT_SERVER'
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
class QuerySourceJobManager(Enum):
|
|
3990
|
-
"""Copied from elastic-spark-common/api/messages/manager.proto with enum values changed by 1 to
|
|
3991
|
-
accommodate JOB_MANAGER_UNSPECIFIED"""
|
|
3992
|
-
|
|
3993
|
-
APP_SYSTEM_TABLE = 'APP_SYSTEM_TABLE'
|
|
3994
|
-
AUTOML = 'AUTOML'
|
|
3995
|
-
AUTO_MAINTENANCE = 'AUTO_MAINTENANCE'
|
|
3996
|
-
CLEAN_ROOMS = 'CLEAN_ROOMS'
|
|
3997
|
-
DATA_MONITORING = 'DATA_MONITORING'
|
|
3998
|
-
DATA_SHARING = 'DATA_SHARING'
|
|
3999
|
-
ENCRYPTION = 'ENCRYPTION'
|
|
4000
|
-
FABRIC_CRAWLER = 'FABRIC_CRAWLER'
|
|
4001
|
-
JOBS = 'JOBS'
|
|
4002
|
-
LAKEVIEW = 'LAKEVIEW'
|
|
4003
|
-
MANAGED_RAG = 'MANAGED_RAG'
|
|
4004
|
-
SCHEDULED_MV_REFRESH = 'SCHEDULED_MV_REFRESH'
|
|
4005
|
-
TESTING = 'TESTING'
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
class QuerySourceTrigger(Enum):
|
|
4009
|
-
|
|
4010
|
-
MANUAL = 'MANUAL'
|
|
4011
|
-
SCHEDULED = 'SCHEDULED'
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
3792
|
class QueryStatementType(Enum):
|
|
4015
3793
|
|
|
4016
3794
|
ALTER = 'ALTER'
|
|
@@ -4228,23 +4006,6 @@ class RunAsRole(Enum):
|
|
|
4228
4006
|
VIEWER = 'viewer'
|
|
4229
4007
|
|
|
4230
4008
|
|
|
4231
|
-
@dataclass
|
|
4232
|
-
class ServerlessChannelInfo:
|
|
4233
|
-
name: Optional[ChannelName] = None
|
|
4234
|
-
"""Name of the Channel"""
|
|
4235
|
-
|
|
4236
|
-
def as_dict(self) -> dict:
|
|
4237
|
-
"""Serializes the ServerlessChannelInfo into a dictionary suitable for use as a JSON request body."""
|
|
4238
|
-
body = {}
|
|
4239
|
-
if self.name is not None: body['name'] = self.name.value
|
|
4240
|
-
return body
|
|
4241
|
-
|
|
4242
|
-
@classmethod
|
|
4243
|
-
def from_dict(cls, d: Dict[str, any]) -> ServerlessChannelInfo:
|
|
4244
|
-
"""Deserializes the ServerlessChannelInfo from a dictionary."""
|
|
4245
|
-
return cls(name=_enum(d, 'name', ChannelName))
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
4009
|
@dataclass
|
|
4249
4010
|
class ServiceError:
|
|
4250
4011
|
error_code: Optional[ServiceErrorCode] = None
|
|
@@ -6800,7 +6561,9 @@ class StatementExecutionAPI:
|
|
|
6800
6561
|
are approximate, occur server-side, and cannot account for things such as caller delays and network
|
|
6801
6562
|
latency from caller to service. - The system will auto-close a statement after one hour if the client
|
|
6802
6563
|
stops polling and thus you must poll at least once an hour. - The results are only available for one hour
|
|
6803
|
-
after success; polling does not extend this.
|
|
6564
|
+
after success; polling does not extend this. - The SQL Execution API must be used for the entire lifecycle
|
|
6565
|
+
of the statement. For example, you cannot use the Jobs API to execute the command, and then the SQL
|
|
6566
|
+
Execution API to cancel it.
|
|
6804
6567
|
|
|
6805
6568
|
[Apache Arrow Columnar]: https://arrow.apache.org/overview/
|
|
6806
6569
|
[Databricks SQL Statement Execution API tutorial]: https://docs.databricks.com/sql/api/sql-execution-tutorial.html"""
|
|
@@ -7106,7 +6869,8 @@ class WarehousesAPI:
|
|
|
7106
6869
|
The amount of time in minutes that a SQL warehouse must be idle (i.e., no RUNNING queries) before it
|
|
7107
6870
|
is automatically stopped.
|
|
7108
6871
|
|
|
7109
|
-
Supported values: - Must be
|
|
6872
|
+
Supported values: - Must be >= 0 mins for serverless warehouses - Must be == 0 or >= 10 mins for
|
|
6873
|
+
non-serverless warehouses - 0 indicates no autostop.
|
|
7110
6874
|
|
|
7111
6875
|
Defaults to 120 mins
|
|
7112
6876
|
:param channel: :class:`Channel` (optional)
|