databricks-sdk 0.32.2__py3-none-any.whl → 0.33.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 +9 -0
- databricks/sdk/credentials_provider.py +91 -6
- databricks/sdk/service/apps.py +154 -106
- databricks/sdk/service/catalog.py +266 -7
- databricks/sdk/service/compute.py +68 -18
- databricks/sdk/service/dashboards.py +32 -9
- databricks/sdk/service/jobs.py +98 -86
- databricks/sdk/service/pipelines.py +58 -1
- databricks/sdk/service/serving.py +326 -10
- databricks/sdk/service/settings.py +394 -1
- databricks/sdk/service/sql.py +3 -243
- databricks/sdk/service/workspace.py +266 -105
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.32.2.dist-info → databricks_sdk-0.33.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.32.2.dist-info → databricks_sdk-0.33.0.dist-info}/RECORD +19 -19
- {databricks_sdk-0.32.2.dist-info → databricks_sdk-0.33.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.32.2.dist-info → databricks_sdk-0.33.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.32.2.dist-info → databricks_sdk-0.33.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.32.2.dist-info → databricks_sdk-0.33.0.dist-info}/top_level.txt +0 -0
databricks/sdk/service/sql.py
CHANGED
|
@@ -503,29 +503,6 @@ class ChannelName(Enum):
|
|
|
503
503
|
CHANNEL_NAME_UNSPECIFIED = 'CHANNEL_NAME_UNSPECIFIED'
|
|
504
504
|
|
|
505
505
|
|
|
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
506
|
@dataclass
|
|
530
507
|
class ColumnInfo:
|
|
531
508
|
name: Optional[str] = None
|
|
@@ -1615,34 +1592,6 @@ class Empty:
|
|
|
1615
1592
|
return cls()
|
|
1616
1593
|
|
|
1617
1594
|
|
|
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
1595
|
@dataclass
|
|
1647
1596
|
class EndpointConfPair:
|
|
1648
1597
|
key: Optional[str] = None
|
|
@@ -3447,8 +3396,6 @@ class QueryInfo:
|
|
|
3447
3396
|
query_id: Optional[str] = None
|
|
3448
3397
|
"""The query ID."""
|
|
3449
3398
|
|
|
3450
|
-
query_source: Optional[QuerySource] = None
|
|
3451
|
-
|
|
3452
3399
|
query_start_time_ms: Optional[int] = None
|
|
3453
3400
|
"""The time the query started."""
|
|
3454
3401
|
|
|
@@ -3496,7 +3443,6 @@ class QueryInfo:
|
|
|
3496
3443
|
if self.plans_state is not None: body['plans_state'] = self.plans_state.value
|
|
3497
3444
|
if self.query_end_time_ms is not None: body['query_end_time_ms'] = self.query_end_time_ms
|
|
3498
3445
|
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
3446
|
if self.query_start_time_ms is not None: body['query_start_time_ms'] = self.query_start_time_ms
|
|
3501
3447
|
if self.query_text is not None: body['query_text'] = self.query_text
|
|
3502
3448
|
if self.rows_produced is not None: body['rows_produced'] = self.rows_produced
|
|
@@ -3524,7 +3470,6 @@ class QueryInfo:
|
|
|
3524
3470
|
plans_state=_enum(d, 'plans_state', PlansState),
|
|
3525
3471
|
query_end_time_ms=d.get('query_end_time_ms', None),
|
|
3526
3472
|
query_id=d.get('query_id', None),
|
|
3527
|
-
query_source=_from_dict(d, 'query_source', QuerySource),
|
|
3528
3473
|
query_start_time_ms=d.get('query_start_time_ms', None),
|
|
3529
3474
|
query_text=d.get('query_text', None),
|
|
3530
3475
|
rows_produced=d.get('rows_produced', None),
|
|
@@ -3841,176 +3786,6 @@ class QueryPostContent:
|
|
|
3841
3786
|
tags=d.get('tags', None))
|
|
3842
3787
|
|
|
3843
3788
|
|
|
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
3789
|
class QueryStatementType(Enum):
|
|
4015
3790
|
|
|
4016
3791
|
ALTER = 'ALTER'
|
|
@@ -4228,23 +4003,6 @@ class RunAsRole(Enum):
|
|
|
4228
4003
|
VIEWER = 'viewer'
|
|
4229
4004
|
|
|
4230
4005
|
|
|
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
4006
|
@dataclass
|
|
4249
4007
|
class ServiceError:
|
|
4250
4008
|
error_code: Optional[ServiceErrorCode] = None
|
|
@@ -6800,7 +6558,9 @@ class StatementExecutionAPI:
|
|
|
6800
6558
|
are approximate, occur server-side, and cannot account for things such as caller delays and network
|
|
6801
6559
|
latency from caller to service. - The system will auto-close a statement after one hour if the client
|
|
6802
6560
|
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.
|
|
6561
|
+
after success; polling does not extend this. - The SQL Execution API must be used for the entire lifecycle
|
|
6562
|
+
of the statement. For example, you cannot use the Jobs API to execute the command, and then the SQL
|
|
6563
|
+
Execution API to cancel it.
|
|
6804
6564
|
|
|
6805
6565
|
[Apache Arrow Columnar]: https://arrow.apache.org/overview/
|
|
6806
6566
|
[Databricks SQL Statement Execution API tutorial]: https://docs.databricks.com/sql/api/sql-execution-tutorial.html"""
|