databricks-sdk 0.28.0__py3-none-any.whl → 0.29.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 +7 -3
- databricks/sdk/config.py +65 -10
- databricks/sdk/core.py +22 -0
- databricks/sdk/credentials_provider.py +121 -44
- databricks/sdk/dbutils.py +81 -3
- databricks/sdk/oauth.py +8 -6
- databricks/sdk/service/catalog.py +132 -28
- databricks/sdk/service/compute.py +21 -13
- databricks/sdk/service/dashboards.py +707 -2
- databricks/sdk/service/jobs.py +126 -152
- databricks/sdk/service/marketplace.py +136 -0
- databricks/sdk/service/oauth2.py +22 -0
- databricks/sdk/service/pipelines.py +1 -1
- databricks/sdk/service/serving.py +140 -55
- databricks/sdk/service/settings.py +1 -0
- databricks/sdk/service/sharing.py +0 -1
- databricks/sdk/service/sql.py +103 -23
- databricks/sdk/service/vectorsearch.py +75 -0
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.29.0.dist-info}/METADATA +2 -1
- {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.29.0.dist-info}/RECORD +25 -25
- {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.29.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.29.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.29.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.28.0.dist-info → databricks_sdk-0.29.0.dist-info}/top_level.txt +0 -0
|
@@ -282,6 +282,7 @@ class ComplianceStandard(Enum):
|
|
|
282
282
|
"""Compliance stardard for SHIELD customers"""
|
|
283
283
|
|
|
284
284
|
COMPLIANCE_STANDARD_UNSPECIFIED = 'COMPLIANCE_STANDARD_UNSPECIFIED'
|
|
285
|
+
CYBER_ESSENTIAL_PLUS = 'CYBER_ESSENTIAL_PLUS'
|
|
285
286
|
FEDRAMP_HIGH = 'FEDRAMP_HIGH'
|
|
286
287
|
FEDRAMP_IL5 = 'FEDRAMP_IL5'
|
|
287
288
|
FEDRAMP_MODERATE = 'FEDRAMP_MODERATE'
|
|
@@ -796,7 +796,6 @@ class Privilege(Enum):
|
|
|
796
796
|
REFRESH = 'REFRESH'
|
|
797
797
|
SELECT = 'SELECT'
|
|
798
798
|
SET_SHARE_PERMISSION = 'SET_SHARE_PERMISSION'
|
|
799
|
-
SINGLE_USER_ACCESS = 'SINGLE_USER_ACCESS'
|
|
800
799
|
USAGE = 'USAGE'
|
|
801
800
|
USE_CATALOG = 'USE_CATALOG'
|
|
802
801
|
USE_CONNECTION = 'USE_CONNECTION'
|
databricks/sdk/service/sql.py
CHANGED
|
@@ -182,7 +182,7 @@ class AlertQuery:
|
|
|
182
182
|
|
|
183
183
|
data_source_id: Optional[str] = None
|
|
184
184
|
"""Data source ID maps to the ID of the data source used by the resource and is distinct from the
|
|
185
|
-
warehouse ID. [Learn more]
|
|
185
|
+
warehouse ID. [Learn more]
|
|
186
186
|
|
|
187
187
|
[Learn more]: https://docs.databricks.com/api/workspace/datasources/list"""
|
|
188
188
|
|
|
@@ -856,7 +856,7 @@ class DataSource:
|
|
|
856
856
|
|
|
857
857
|
id: Optional[str] = None
|
|
858
858
|
"""Data source ID maps to the ID of the data source used by the resource and is distinct from the
|
|
859
|
-
warehouse ID. [Learn more]
|
|
859
|
+
warehouse ID. [Learn more]
|
|
860
860
|
|
|
861
861
|
[Learn more]: https://docs.databricks.com/api/workspace/datasources/list"""
|
|
862
862
|
|
|
@@ -1390,8 +1390,9 @@ class ExecuteStatementRequest:
|
|
|
1390
1390
|
"""The SQL statement to execute. The statement can optionally be parameterized, see `parameters`."""
|
|
1391
1391
|
|
|
1392
1392
|
warehouse_id: str
|
|
1393
|
-
"""Warehouse upon which to execute a statement. See also [What are SQL
|
|
1394
|
-
|
|
1393
|
+
"""Warehouse upon which to execute a statement. See also [What are SQL warehouses?]
|
|
1394
|
+
|
|
1395
|
+
[What are SQL warehouses?]: https://docs.databricks.com/sql/admin/warehouse-type.html"""
|
|
1395
1396
|
|
|
1396
1397
|
byte_limit: Optional[int] = None
|
|
1397
1398
|
"""Applies the given byte limit to the statement's result size. Byte counts are based on internal
|
|
@@ -2241,7 +2242,7 @@ class Query:
|
|
|
2241
2242
|
|
|
2242
2243
|
data_source_id: Optional[str] = None
|
|
2243
2244
|
"""Data source ID maps to the ID of the data source used by the resource and is distinct from the
|
|
2244
|
-
warehouse ID. [Learn more]
|
|
2245
|
+
warehouse ID. [Learn more]
|
|
2245
2246
|
|
|
2246
2247
|
[Learn more]: https://docs.databricks.com/api/workspace/datasources/list"""
|
|
2247
2248
|
|
|
@@ -2374,7 +2375,7 @@ class Query:
|
|
|
2374
2375
|
class QueryEditContent:
|
|
2375
2376
|
data_source_id: Optional[str] = None
|
|
2376
2377
|
"""Data source ID maps to the ID of the data source used by the resource and is distinct from the
|
|
2377
|
-
warehouse ID. [Learn more]
|
|
2378
|
+
warehouse ID. [Learn more]
|
|
2378
2379
|
|
|
2379
2380
|
[Learn more]: https://docs.databricks.com/api/workspace/datasources/list"""
|
|
2380
2381
|
|
|
@@ -2472,7 +2473,7 @@ class QueryInfo:
|
|
|
2472
2473
|
"""Channel information for the SQL warehouse at the time of query execution"""
|
|
2473
2474
|
|
|
2474
2475
|
duration: Optional[int] = None
|
|
2475
|
-
"""Total execution time of the
|
|
2476
|
+
"""Total execution time of the statement ( excluding result fetch time )."""
|
|
2476
2477
|
|
|
2477
2478
|
endpoint_id: Optional[str] = None
|
|
2478
2479
|
"""Alias for `warehouse_id`."""
|
|
@@ -2807,7 +2808,7 @@ class QueryOptions:
|
|
|
2807
2808
|
class QueryPostContent:
|
|
2808
2809
|
data_source_id: Optional[str] = None
|
|
2809
2810
|
"""Data source ID maps to the ID of the data source used by the resource and is distinct from the
|
|
2810
|
-
warehouse ID. [Learn more]
|
|
2811
|
+
warehouse ID. [Learn more]
|
|
2811
2812
|
|
|
2812
2813
|
[Learn more]: https://docs.databricks.com/api/workspace/datasources/list"""
|
|
2813
2814
|
|
|
@@ -3273,8 +3274,10 @@ class StatementParameterListItem:
|
|
|
3273
3274
|
type: Optional[str] = None
|
|
3274
3275
|
"""The data type, given as a string. For example: `INT`, `STRING`, `DECIMAL(10,2)`. If no type is
|
|
3275
3276
|
given the type is assumed to be `STRING`. Complex types, such as `ARRAY`, `MAP`, and `STRUCT`
|
|
3276
|
-
are not supported. For valid types, refer to the section [Data
|
|
3277
|
-
|
|
3277
|
+
are not supported. For valid types, refer to the section [Data types] of the SQL language
|
|
3278
|
+
reference.
|
|
3279
|
+
|
|
3280
|
+
[Data types]: https://docs.databricks.com/sql/language-manual/functions/cast.html"""
|
|
3278
3281
|
|
|
3279
3282
|
value: Optional[str] = None
|
|
3280
3283
|
"""The value to substitute, represented as a string. If omitted, the value is interpreted as NULL."""
|
|
@@ -3959,7 +3962,11 @@ class AlertsAPI:
|
|
|
3959
3962
|
"""The alerts API can be used to perform CRUD operations on alerts. An alert is a Databricks SQL object that
|
|
3960
3963
|
periodically runs a query, evaluates a condition of its result, and notifies one or more users and/or
|
|
3961
3964
|
notification destinations if the condition was met. Alerts can be scheduled using the `sql_task` type of
|
|
3962
|
-
the Jobs API, e.g. :method:jobs/create.
|
|
3965
|
+
the Jobs API, e.g. :method:jobs/create.
|
|
3966
|
+
|
|
3967
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
3968
|
+
|
|
3969
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources"""
|
|
3963
3970
|
|
|
3964
3971
|
def __init__(self, api_client):
|
|
3965
3972
|
self._api = api_client
|
|
@@ -3976,6 +3983,10 @@ class AlertsAPI:
|
|
|
3976
3983
|
Creates an alert. An alert is a Databricks SQL object that periodically runs a query, evaluates a
|
|
3977
3984
|
condition of its result, and notifies users or notification destinations if the condition was met.
|
|
3978
3985
|
|
|
3986
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
3987
|
+
|
|
3988
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources
|
|
3989
|
+
|
|
3979
3990
|
:param name: str
|
|
3980
3991
|
Name of the alert.
|
|
3981
3992
|
:param options: :class:`AlertOptions`
|
|
@@ -4004,9 +4015,13 @@ class AlertsAPI:
|
|
|
4004
4015
|
def delete(self, alert_id: str):
|
|
4005
4016
|
"""Delete an alert.
|
|
4006
4017
|
|
|
4007
|
-
Deletes an alert. Deleted alerts are no longer accessible and cannot be restored. **Note
|
|
4018
|
+
Deletes an alert. Deleted alerts are no longer accessible and cannot be restored. **Note**: Unlike
|
|
4008
4019
|
queries and dashboards, alerts cannot be moved to the trash.
|
|
4009
4020
|
|
|
4021
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4022
|
+
|
|
4023
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources
|
|
4024
|
+
|
|
4010
4025
|
:param alert_id: str
|
|
4011
4026
|
|
|
4012
4027
|
|
|
@@ -4021,6 +4036,10 @@ class AlertsAPI:
|
|
|
4021
4036
|
|
|
4022
4037
|
Gets an alert.
|
|
4023
4038
|
|
|
4039
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4040
|
+
|
|
4041
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources
|
|
4042
|
+
|
|
4024
4043
|
:param alert_id: str
|
|
4025
4044
|
|
|
4026
4045
|
:returns: :class:`Alert`
|
|
@@ -4036,6 +4055,10 @@ class AlertsAPI:
|
|
|
4036
4055
|
|
|
4037
4056
|
Gets a list of alerts.
|
|
4038
4057
|
|
|
4058
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4059
|
+
|
|
4060
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources
|
|
4061
|
+
|
|
4039
4062
|
:returns: Iterator over :class:`Alert`
|
|
4040
4063
|
"""
|
|
4041
4064
|
|
|
@@ -4055,6 +4078,10 @@ class AlertsAPI:
|
|
|
4055
4078
|
|
|
4056
4079
|
Updates an alert.
|
|
4057
4080
|
|
|
4081
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4082
|
+
|
|
4083
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources
|
|
4084
|
+
|
|
4058
4085
|
:param alert_id: str
|
|
4059
4086
|
:param name: str
|
|
4060
4087
|
Name of the alert.
|
|
@@ -4256,8 +4283,8 @@ class DashboardsAPI:
|
|
|
4256
4283
|
|
|
4257
4284
|
Fetch a paginated list of dashboard objects.
|
|
4258
4285
|
|
|
4259
|
-
|
|
4260
|
-
degradation, or a temporary ban
|
|
4286
|
+
**Warning**: Calling this API concurrently 10 or more times could result in throttling, service
|
|
4287
|
+
degradation, or a temporary ban.
|
|
4261
4288
|
|
|
4262
4289
|
:param order: :class:`ListOrder` (optional)
|
|
4263
4290
|
Name of dashboard attribute to order by.
|
|
@@ -4351,7 +4378,11 @@ class DataSourcesAPI:
|
|
|
4351
4378
|
|
|
4352
4379
|
This API does not support searches. It returns the full list of SQL warehouses in your workspace. We
|
|
4353
4380
|
advise you to use any text editor, REST client, or `grep` to search the response from this API for the
|
|
4354
|
-
name of your SQL warehouse as it appears in Databricks SQL.
|
|
4381
|
+
name of your SQL warehouse as it appears in Databricks SQL.
|
|
4382
|
+
|
|
4383
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4384
|
+
|
|
4385
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources"""
|
|
4355
4386
|
|
|
4356
4387
|
def __init__(self, api_client):
|
|
4357
4388
|
self._api = api_client
|
|
@@ -4363,6 +4394,10 @@ class DataSourcesAPI:
|
|
|
4363
4394
|
API response are enumerated for clarity. However, you need only a SQL warehouse's `id` to create new
|
|
4364
4395
|
queries against it.
|
|
4365
4396
|
|
|
4397
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4398
|
+
|
|
4399
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources
|
|
4400
|
+
|
|
4366
4401
|
:returns: Iterator over :class:`DataSource`
|
|
4367
4402
|
"""
|
|
4368
4403
|
|
|
@@ -4383,7 +4418,11 @@ class DbsqlPermissionsAPI:
|
|
|
4383
4418
|
|
|
4384
4419
|
- `CAN_RUN`: Allows read access and run access (superset of `CAN_VIEW`)
|
|
4385
4420
|
|
|
4386
|
-
- `CAN_MANAGE`: Allows all actions: read, run, edit, delete, modify permissions (superset of `CAN_RUN`)
|
|
4421
|
+
- `CAN_MANAGE`: Allows all actions: read, run, edit, delete, modify permissions (superset of `CAN_RUN`)
|
|
4422
|
+
|
|
4423
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4424
|
+
|
|
4425
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources"""
|
|
4387
4426
|
|
|
4388
4427
|
def __init__(self, api_client):
|
|
4389
4428
|
self._api = api_client
|
|
@@ -4393,6 +4432,10 @@ class DbsqlPermissionsAPI:
|
|
|
4393
4432
|
|
|
4394
4433
|
Gets a JSON representation of the access control list (ACL) for a specified object.
|
|
4395
4434
|
|
|
4435
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4436
|
+
|
|
4437
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources
|
|
4438
|
+
|
|
4396
4439
|
:param object_type: :class:`ObjectTypePlural`
|
|
4397
4440
|
The type of object permissions to check.
|
|
4398
4441
|
:param object_id: str
|
|
@@ -4418,6 +4461,10 @@ class DbsqlPermissionsAPI:
|
|
|
4418
4461
|
Sets the access control list (ACL) for a specified object. This operation will complete rewrite the
|
|
4419
4462
|
ACL.
|
|
4420
4463
|
|
|
4464
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4465
|
+
|
|
4466
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources
|
|
4467
|
+
|
|
4421
4468
|
:param object_type: :class:`ObjectTypePlural`
|
|
4422
4469
|
The type of object permission to set.
|
|
4423
4470
|
:param object_id: str
|
|
@@ -4446,6 +4493,10 @@ class DbsqlPermissionsAPI:
|
|
|
4446
4493
|
|
|
4447
4494
|
Transfers ownership of a dashboard, query, or alert to an active user. Requires an admin API key.
|
|
4448
4495
|
|
|
4496
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4497
|
+
|
|
4498
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources
|
|
4499
|
+
|
|
4449
4500
|
:param object_type: :class:`OwnableObjectType`
|
|
4450
4501
|
The type of object on which to change ownership.
|
|
4451
4502
|
:param object_id: :class:`TransferOwnershipObjectId`
|
|
@@ -4469,7 +4520,11 @@ class DbsqlPermissionsAPI:
|
|
|
4469
4520
|
class QueriesAPI:
|
|
4470
4521
|
"""These endpoints are used for CRUD operations on query definitions. Query definitions include the target
|
|
4471
4522
|
SQL warehouse, query text, name, description, tags, parameters, and visualizations. Queries can be
|
|
4472
|
-
scheduled using the `sql_task` type of the Jobs API, e.g. :method:jobs/create.
|
|
4523
|
+
scheduled using the `sql_task` type of the Jobs API, e.g. :method:jobs/create.
|
|
4524
|
+
|
|
4525
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4526
|
+
|
|
4527
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources"""
|
|
4473
4528
|
|
|
4474
4529
|
def __init__(self, api_client):
|
|
4475
4530
|
self._api = api_client
|
|
@@ -4495,9 +4550,13 @@ class QueriesAPI:
|
|
|
4495
4550
|
|
|
4496
4551
|
**Note**: You cannot add a visualization until you create the query.
|
|
4497
4552
|
|
|
4553
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4554
|
+
|
|
4555
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources
|
|
4556
|
+
|
|
4498
4557
|
:param data_source_id: str (optional)
|
|
4499
4558
|
Data source ID maps to the ID of the data source used by the resource and is distinct from the
|
|
4500
|
-
warehouse ID. [Learn more]
|
|
4559
|
+
warehouse ID. [Learn more]
|
|
4501
4560
|
|
|
4502
4561
|
[Learn more]: https://docs.databricks.com/api/workspace/datasources/list
|
|
4503
4562
|
:param description: str (optional)
|
|
@@ -4539,6 +4598,10 @@ class QueriesAPI:
|
|
|
4539
4598
|
Moves a query to the trash. Trashed queries immediately disappear from searches and list views, and
|
|
4540
4599
|
they cannot be used for alerts. The trash is deleted after 30 days.
|
|
4541
4600
|
|
|
4601
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4602
|
+
|
|
4603
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources
|
|
4604
|
+
|
|
4542
4605
|
:param query_id: str
|
|
4543
4606
|
|
|
4544
4607
|
|
|
@@ -4554,6 +4617,10 @@ class QueriesAPI:
|
|
|
4554
4617
|
Retrieve a query object definition along with contextual permissions information about the currently
|
|
4555
4618
|
authenticated user.
|
|
4556
4619
|
|
|
4620
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4621
|
+
|
|
4622
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources
|
|
4623
|
+
|
|
4557
4624
|
:param query_id: str
|
|
4558
4625
|
|
|
4559
4626
|
:returns: :class:`Query`
|
|
@@ -4574,8 +4641,12 @@ class QueriesAPI:
|
|
|
4574
4641
|
|
|
4575
4642
|
Gets a list of queries. Optionally, this list can be filtered by a search term.
|
|
4576
4643
|
|
|
4577
|
-
|
|
4578
|
-
degradation, or a temporary ban
|
|
4644
|
+
**Warning**: Calling this API concurrently 10 or more times could result in throttling, service
|
|
4645
|
+
degradation, or a temporary ban.
|
|
4646
|
+
|
|
4647
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4648
|
+
|
|
4649
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources
|
|
4579
4650
|
|
|
4580
4651
|
:param order: str (optional)
|
|
4581
4652
|
Name of query attribute to order by. Default sort order is ascending. Append a dash (`-`) to order
|
|
@@ -4630,6 +4701,10 @@ class QueriesAPI:
|
|
|
4630
4701
|
Restore a query that has been moved to the trash. A restored query appears in list views and searches.
|
|
4631
4702
|
You can use restored queries for alerts.
|
|
4632
4703
|
|
|
4704
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4705
|
+
|
|
4706
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources
|
|
4707
|
+
|
|
4633
4708
|
:param query_id: str
|
|
4634
4709
|
|
|
4635
4710
|
|
|
@@ -4655,10 +4730,14 @@ class QueriesAPI:
|
|
|
4655
4730
|
|
|
4656
4731
|
**Note**: You cannot undo this operation.
|
|
4657
4732
|
|
|
4733
|
+
**Note**: A new version of the Databricks SQL API will soon be available. [Learn more]
|
|
4734
|
+
|
|
4735
|
+
[Learn more]: https://docs.databricks.com/en/whats-coming.html#updates-to-the-databricks-sql-api-for-managing-queries-alerts-and-data-sources
|
|
4736
|
+
|
|
4658
4737
|
:param query_id: str
|
|
4659
4738
|
:param data_source_id: str (optional)
|
|
4660
4739
|
Data source ID maps to the ID of the data source used by the resource and is distinct from the
|
|
4661
|
-
warehouse ID. [Learn more]
|
|
4740
|
+
warehouse ID. [Learn more]
|
|
4662
4741
|
|
|
4663
4742
|
[Learn more]: https://docs.databricks.com/api/workspace/datasources/list
|
|
4664
4743
|
:param description: str (optional)
|
|
@@ -4960,8 +5039,9 @@ class StatementExecutionAPI:
|
|
|
4960
5039
|
:param statement: str
|
|
4961
5040
|
The SQL statement to execute. The statement can optionally be parameterized, see `parameters`.
|
|
4962
5041
|
:param warehouse_id: str
|
|
4963
|
-
Warehouse upon which to execute a statement. See also [What are SQL
|
|
4964
|
-
|
|
5042
|
+
Warehouse upon which to execute a statement. See also [What are SQL warehouses?]
|
|
5043
|
+
|
|
5044
|
+
[What are SQL warehouses?]: https://docs.databricks.com/sql/admin/warehouse-type.html
|
|
4965
5045
|
:param byte_limit: int (optional)
|
|
4966
5046
|
Applies the given byte limit to the statement's result size. Byte counts are based on internal data
|
|
4967
5047
|
representations and might not match the final size in the requested `format`. If the result was
|
|
@@ -644,6 +644,35 @@ class PipelineType(Enum):
|
|
|
644
644
|
TRIGGERED = 'TRIGGERED'
|
|
645
645
|
|
|
646
646
|
|
|
647
|
+
@dataclass
|
|
648
|
+
class QueryVectorIndexNextPageRequest:
|
|
649
|
+
"""Request payload for getting next page of results."""
|
|
650
|
+
|
|
651
|
+
endpoint_name: Optional[str] = None
|
|
652
|
+
"""Name of the endpoint."""
|
|
653
|
+
|
|
654
|
+
index_name: Optional[str] = None
|
|
655
|
+
"""Name of the vector index to query."""
|
|
656
|
+
|
|
657
|
+
page_token: Optional[str] = None
|
|
658
|
+
"""Page token returned from previous `QueryVectorIndex` or `QueryVectorIndexNextPage` API."""
|
|
659
|
+
|
|
660
|
+
def as_dict(self) -> dict:
|
|
661
|
+
"""Serializes the QueryVectorIndexNextPageRequest into a dictionary suitable for use as a JSON request body."""
|
|
662
|
+
body = {}
|
|
663
|
+
if self.endpoint_name is not None: body['endpoint_name'] = self.endpoint_name
|
|
664
|
+
if self.index_name is not None: body['index_name'] = self.index_name
|
|
665
|
+
if self.page_token is not None: body['page_token'] = self.page_token
|
|
666
|
+
return body
|
|
667
|
+
|
|
668
|
+
@classmethod
|
|
669
|
+
def from_dict(cls, d: Dict[str, any]) -> QueryVectorIndexNextPageRequest:
|
|
670
|
+
"""Deserializes the QueryVectorIndexNextPageRequest from a dictionary."""
|
|
671
|
+
return cls(endpoint_name=d.get('endpoint_name', None),
|
|
672
|
+
index_name=d.get('index_name', None),
|
|
673
|
+
page_token=d.get('page_token', None))
|
|
674
|
+
|
|
675
|
+
|
|
647
676
|
@dataclass
|
|
648
677
|
class QueryVectorIndexRequest:
|
|
649
678
|
columns: List[str]
|
|
@@ -665,6 +694,9 @@ class QueryVectorIndexRequest:
|
|
|
665
694
|
query_text: Optional[str] = None
|
|
666
695
|
"""Query text. Required for Delta Sync Index using model endpoint."""
|
|
667
696
|
|
|
697
|
+
query_type: Optional[str] = None
|
|
698
|
+
"""The query type to use. Choices are `ANN` and `HYBRID`. Defaults to `ANN`."""
|
|
699
|
+
|
|
668
700
|
query_vector: Optional[List[float]] = None
|
|
669
701
|
"""Query vector. Required for Direct Vector Access Index and Delta Sync Index using self-managed
|
|
670
702
|
vectors."""
|
|
@@ -680,6 +712,7 @@ class QueryVectorIndexRequest:
|
|
|
680
712
|
if self.index_name is not None: body['index_name'] = self.index_name
|
|
681
713
|
if self.num_results is not None: body['num_results'] = self.num_results
|
|
682
714
|
if self.query_text is not None: body['query_text'] = self.query_text
|
|
715
|
+
if self.query_type is not None: body['query_type'] = self.query_type
|
|
683
716
|
if self.query_vector: body['query_vector'] = [v for v in self.query_vector]
|
|
684
717
|
if self.score_threshold is not None: body['score_threshold'] = self.score_threshold
|
|
685
718
|
return body
|
|
@@ -692,6 +725,7 @@ class QueryVectorIndexRequest:
|
|
|
692
725
|
index_name=d.get('index_name', None),
|
|
693
726
|
num_results=d.get('num_results', None),
|
|
694
727
|
query_text=d.get('query_text', None),
|
|
728
|
+
query_type=d.get('query_type', None),
|
|
695
729
|
query_vector=d.get('query_vector', None),
|
|
696
730
|
score_threshold=d.get('score_threshold', None))
|
|
697
731
|
|
|
@@ -701,6 +735,11 @@ class QueryVectorIndexResponse:
|
|
|
701
735
|
manifest: Optional[ResultManifest] = None
|
|
702
736
|
"""Metadata about the result set."""
|
|
703
737
|
|
|
738
|
+
next_page_token: Optional[str] = None
|
|
739
|
+
"""[Optional] Token that can be used in `QueryVectorIndexNextPage` API to get next page of results.
|
|
740
|
+
If more than 1000 results satisfy the query, they are returned in groups of 1000. Empty value
|
|
741
|
+
means no more results."""
|
|
742
|
+
|
|
704
743
|
result: Optional[ResultData] = None
|
|
705
744
|
"""Data returned in the query result."""
|
|
706
745
|
|
|
@@ -708,6 +747,7 @@ class QueryVectorIndexResponse:
|
|
|
708
747
|
"""Serializes the QueryVectorIndexResponse into a dictionary suitable for use as a JSON request body."""
|
|
709
748
|
body = {}
|
|
710
749
|
if self.manifest: body['manifest'] = self.manifest.as_dict()
|
|
750
|
+
if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
|
|
711
751
|
if self.result: body['result'] = self.result.as_dict()
|
|
712
752
|
return body
|
|
713
753
|
|
|
@@ -715,6 +755,7 @@ class QueryVectorIndexResponse:
|
|
|
715
755
|
def from_dict(cls, d: Dict[str, any]) -> QueryVectorIndexResponse:
|
|
716
756
|
"""Deserializes the QueryVectorIndexResponse from a dictionary."""
|
|
717
757
|
return cls(manifest=_from_dict(d, 'manifest', ResultManifest),
|
|
758
|
+
next_page_token=d.get('next_page_token', None),
|
|
718
759
|
result=_from_dict(d, 'result', ResultData))
|
|
719
760
|
|
|
720
761
|
|
|
@@ -1330,6 +1371,7 @@ class VectorSearchIndexesAPI:
|
|
|
1330
1371
|
filters_json: Optional[str] = None,
|
|
1331
1372
|
num_results: Optional[int] = None,
|
|
1332
1373
|
query_text: Optional[str] = None,
|
|
1374
|
+
query_type: Optional[str] = None,
|
|
1333
1375
|
query_vector: Optional[List[float]] = None,
|
|
1334
1376
|
score_threshold: Optional[float] = None) -> QueryVectorIndexResponse:
|
|
1335
1377
|
"""Query an index.
|
|
@@ -1350,6 +1392,8 @@ class VectorSearchIndexesAPI:
|
|
|
1350
1392
|
Number of results to return. Defaults to 10.
|
|
1351
1393
|
:param query_text: str (optional)
|
|
1352
1394
|
Query text. Required for Delta Sync Index using model endpoint.
|
|
1395
|
+
:param query_type: str (optional)
|
|
1396
|
+
The query type to use. Choices are `ANN` and `HYBRID`. Defaults to `ANN`.
|
|
1353
1397
|
:param query_vector: List[float] (optional)
|
|
1354
1398
|
Query vector. Required for Direct Vector Access Index and Delta Sync Index using self-managed
|
|
1355
1399
|
vectors.
|
|
@@ -1363,6 +1407,7 @@ class VectorSearchIndexesAPI:
|
|
|
1363
1407
|
if filters_json is not None: body['filters_json'] = filters_json
|
|
1364
1408
|
if num_results is not None: body['num_results'] = num_results
|
|
1365
1409
|
if query_text is not None: body['query_text'] = query_text
|
|
1410
|
+
if query_type is not None: body['query_type'] = query_type
|
|
1366
1411
|
if query_vector is not None: body['query_vector'] = [v for v in query_vector]
|
|
1367
1412
|
if score_threshold is not None: body['score_threshold'] = score_threshold
|
|
1368
1413
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
@@ -1373,6 +1418,36 @@ class VectorSearchIndexesAPI:
|
|
|
1373
1418
|
headers=headers)
|
|
1374
1419
|
return QueryVectorIndexResponse.from_dict(res)
|
|
1375
1420
|
|
|
1421
|
+
def query_next_page(self,
|
|
1422
|
+
index_name: str,
|
|
1423
|
+
*,
|
|
1424
|
+
endpoint_name: Optional[str] = None,
|
|
1425
|
+
page_token: Optional[str] = None) -> QueryVectorIndexResponse:
|
|
1426
|
+
"""Query next page.
|
|
1427
|
+
|
|
1428
|
+
Use `next_page_token` returned from previous `QueryVectorIndex` or `QueryVectorIndexNextPage` request
|
|
1429
|
+
to fetch next page of results.
|
|
1430
|
+
|
|
1431
|
+
:param index_name: str
|
|
1432
|
+
Name of the vector index to query.
|
|
1433
|
+
:param endpoint_name: str (optional)
|
|
1434
|
+
Name of the endpoint.
|
|
1435
|
+
:param page_token: str (optional)
|
|
1436
|
+
Page token returned from previous `QueryVectorIndex` or `QueryVectorIndexNextPage` API.
|
|
1437
|
+
|
|
1438
|
+
:returns: :class:`QueryVectorIndexResponse`
|
|
1439
|
+
"""
|
|
1440
|
+
body = {}
|
|
1441
|
+
if endpoint_name is not None: body['endpoint_name'] = endpoint_name
|
|
1442
|
+
if page_token is not None: body['page_token'] = page_token
|
|
1443
|
+
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1444
|
+
|
|
1445
|
+
res = self._api.do('POST',
|
|
1446
|
+
f'/api/2.0/vector-search/indexes/{index_name}/query-next-page',
|
|
1447
|
+
body=body,
|
|
1448
|
+
headers=headers)
|
|
1449
|
+
return QueryVectorIndexResponse.from_dict(res)
|
|
1450
|
+
|
|
1376
1451
|
def scan_index(self,
|
|
1377
1452
|
index_name: str,
|
|
1378
1453
|
*,
|
databricks/sdk/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '0.
|
|
1
|
+
__version__ = '0.29.0'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: databricks-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.29.0
|
|
4
4
|
Summary: Databricks SDK for Python (Beta)
|
|
5
5
|
Home-page: https://databricks-sdk-py.readthedocs.io
|
|
6
6
|
Author: Serge Smertin
|
|
@@ -37,6 +37,7 @@ Requires-Dist: pyfakefs ; extra == 'dev'
|
|
|
37
37
|
Requires-Dist: pytest ; extra == 'dev'
|
|
38
38
|
Requires-Dist: pytest-cov ; extra == 'dev'
|
|
39
39
|
Requires-Dist: pytest-mock ; extra == 'dev'
|
|
40
|
+
Requires-Dist: pytest-rerunfailures ; extra == 'dev'
|
|
40
41
|
Requires-Dist: pytest-xdist ; extra == 'dev'
|
|
41
42
|
Requires-Dist: requests-mock ; extra == 'dev'
|
|
42
43
|
Requires-Dist: wheel ; extra == 'dev'
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
databricks/__init__.py,sha256=CF2MJcZFwbpn9TwQER8qnCDhkPooBGQNVkX4v7g6p3g,537
|
|
2
|
-
databricks/sdk/__init__.py,sha256=
|
|
2
|
+
databricks/sdk/__init__.py,sha256=BvgOwu_sZ7kMVO0ukpgMLnAxKHkGnY5_4QeBr-AdFt8,44140
|
|
3
3
|
databricks/sdk/_property.py,sha256=sGjsipeFrjMBSVPjtIb0HNCRcMIhFpVx6wq4BkC3LWs,1636
|
|
4
4
|
databricks/sdk/azure.py,sha256=8P7nEdun0hbQCap9Ojo7yZse_JHxnhYsE6ApojnPz7Q,1009
|
|
5
5
|
databricks/sdk/casing.py,sha256=NKYPrfPbQjM7lU4hhNQK3z1jb_VEA29BfH4FEdby2tg,1137
|
|
6
6
|
databricks/sdk/clock.py,sha256=Ivlow0r_TkXcTJ8UXkxSA0czKrY0GvwHAeOvjPkJnAQ,1360
|
|
7
|
-
databricks/sdk/config.py,sha256=
|
|
8
|
-
databricks/sdk/core.py,sha256=
|
|
9
|
-
databricks/sdk/credentials_provider.py,sha256=
|
|
10
|
-
databricks/sdk/dbutils.py,sha256=
|
|
7
|
+
databricks/sdk/config.py,sha256=sBIWdZHaL3WfJz9gVrlxSRiQpe_tPBMpWA0aaO4bHD4,21745
|
|
8
|
+
databricks/sdk/core.py,sha256=R9PeiAhPMapuC9S5Mw6UmpI2MDp4E32-NzhWm4oFAck,20018
|
|
9
|
+
databricks/sdk/credentials_provider.py,sha256=RVyP0IQbiUbXeUTv2IPmweRzvrgyEhmc6VB0zuetR2I,29204
|
|
10
|
+
databricks/sdk/dbutils.py,sha256=HFCuB-el6SFKhF8qRfJxYANtyLTm-VG9GtQuQgZXFkM,15741
|
|
11
11
|
databricks/sdk/environments.py,sha256=5KoVuVfF-ZX17rua1sH3EJCCtniVrREXBXsMNDEV-UU,4293
|
|
12
|
-
databricks/sdk/oauth.py,sha256=
|
|
12
|
+
databricks/sdk/oauth.py,sha256=KzcJPYLL3JL6RDvf_Q8SDAaF9xSaoYNCRD4rYInZDuo,18319
|
|
13
13
|
databricks/sdk/py.typed,sha256=pSvaHpbY1UPNEXyVFUjlgBhjPFZMmVC_UNrPC7eMOHI,74
|
|
14
14
|
databricks/sdk/retries.py,sha256=WgLh12bwdBc6fCQlaig3kKu18cVhPzFDGsspvq629Ew,2454
|
|
15
|
-
databricks/sdk/version.py,sha256=
|
|
15
|
+
databricks/sdk/version.py,sha256=mXICichpk9VjfOW_vwM-zwKsrhkYyfYKUsV4l3tgiYM,23
|
|
16
16
|
databricks/sdk/_widgets/__init__.py,sha256=Qm3JB8LmdPgEn_-VgxKkodTO4gn6OdaDPwsYcDmeIRI,2667
|
|
17
17
|
databricks/sdk/_widgets/default_widgets_utils.py,sha256=Rk59AFzVYVpOektB_yC_7j-vSt5OdtZA85IlG0kw0xA,1202
|
|
18
18
|
databricks/sdk/_widgets/ipywidgets_utils.py,sha256=P-AyGeahPiX3S59mxpAMgffi4gyJ0irEOY7Ekkn9nQ0,2850
|
|
@@ -32,26 +32,26 @@ databricks/sdk/runtime/dbutils_stub.py,sha256=UFbRZF-bBcwxjbv_pxma00bjNtktLLaYpo
|
|
|
32
32
|
databricks/sdk/service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
33
|
databricks/sdk/service/_internal.py,sha256=nWbJfW5eJCQgAZ3TmA26xoWb6SNZ5N76ZA8bO1N4AsU,1961
|
|
34
34
|
databricks/sdk/service/billing.py,sha256=Hbe5bMsBrpebuAl8yj-GwVRGktrzKwiZJj3gq1wUMaI,50625
|
|
35
|
-
databricks/sdk/service/catalog.py,sha256=
|
|
36
|
-
databricks/sdk/service/compute.py,sha256=
|
|
37
|
-
databricks/sdk/service/dashboards.py,sha256=
|
|
35
|
+
databricks/sdk/service/catalog.py,sha256=m69PNTCN8AmvYeU5NFKQHIf6JsPLkNm4Q9Vj_bm2mlE,416701
|
|
36
|
+
databricks/sdk/service/compute.py,sha256=Wn0M4irami1Qy6wUoyU8Ub_CbSwsSVUF_bdHqUpEh0M,398609
|
|
37
|
+
databricks/sdk/service/dashboards.py,sha256=Ac7K8ekefbfXyZ2ITq7h7uN1MRjCHC6mQoVPcCFgPX8,48962
|
|
38
38
|
databricks/sdk/service/files.py,sha256=VCt83YSI9rhQexmxaQdrUXHq2UCYfZcDMLvJx5X6n1M,38162
|
|
39
39
|
databricks/sdk/service/iam.py,sha256=11L45bjOYwzxMVlAXpKrFMOxrZzgZy75JSIOkeAXuFg,147645
|
|
40
|
-
databricks/sdk/service/jobs.py,sha256=
|
|
41
|
-
databricks/sdk/service/marketplace.py,sha256
|
|
40
|
+
databricks/sdk/service/jobs.py,sha256=v9BoJ0k0BRr0dAjmwX_BQ0Ao8n-gU5t7rhrF1qc0KE4,303103
|
|
41
|
+
databricks/sdk/service/marketplace.py,sha256=0xNm1Ob7G6Le5ieG7meJpBbmkt18gko1bhmORG9DwoM,141176
|
|
42
42
|
databricks/sdk/service/ml.py,sha256=vohBdESClI3EOpO-ZZ44W-CMz1alq5Tw4oJnWa99Z2M,236128
|
|
43
|
-
databricks/sdk/service/oauth2.py,sha256=
|
|
44
|
-
databricks/sdk/service/pipelines.py,sha256=
|
|
43
|
+
databricks/sdk/service/oauth2.py,sha256=yBY6S_rI2ottFjttYDDijjyoAWFndwfqFC50sdimcSY,37100
|
|
44
|
+
databricks/sdk/service/pipelines.py,sha256=Zp-ogtJl2VN5ssi65ii2wI2nbOYPE8Qdhgp36aUitfo,118753
|
|
45
45
|
databricks/sdk/service/provisioning.py,sha256=DP4Df4X-p0JEUk4zAJQhjX_wxpMi673OKLXFhxl6YSE,142678
|
|
46
|
-
databricks/sdk/service/serving.py,sha256=
|
|
47
|
-
databricks/sdk/service/settings.py,sha256=
|
|
48
|
-
databricks/sdk/service/sharing.py,sha256=
|
|
49
|
-
databricks/sdk/service/sql.py,sha256=
|
|
50
|
-
databricks/sdk/service/vectorsearch.py,sha256=
|
|
46
|
+
databricks/sdk/service/serving.py,sha256=Hg5v87ap49j4H5B6_RKe8auGKDamWskp1PQTBDCCwQ0,150238
|
|
47
|
+
databricks/sdk/service/settings.py,sha256=7c_gSsOZtTpmSGE-OVKMnkpbc5wqoN447zX-vyDhrJk,177409
|
|
48
|
+
databricks/sdk/service/sharing.py,sha256=dtMJdIhGLh8a70Aq55dqGsUG12ykiz_7zgEvg2Iw42A,100135
|
|
49
|
+
databricks/sdk/service/sql.py,sha256=v8oP0sA_mix3ftSujtaVG4tfXGnSHeBJbA7c6iWW-1c,262958
|
|
50
|
+
databricks/sdk/service/vectorsearch.py,sha256=ZfiTEpTNg8nnzPuw24MeiDn8eq6PHmEWqTHS0zdDdEo,62484
|
|
51
51
|
databricks/sdk/service/workspace.py,sha256=FKLf5esRmfFstIXo7HQg6HQCzQ2svrb6ulr8yzZ7-8U,101182
|
|
52
|
-
databricks_sdk-0.
|
|
53
|
-
databricks_sdk-0.
|
|
54
|
-
databricks_sdk-0.
|
|
55
|
-
databricks_sdk-0.
|
|
56
|
-
databricks_sdk-0.
|
|
57
|
-
databricks_sdk-0.
|
|
52
|
+
databricks_sdk-0.29.0.dist-info/LICENSE,sha256=afBgTZo-JsYqj4VOjnejBetMuHKcFR30YobDdpVFkqY,11411
|
|
53
|
+
databricks_sdk-0.29.0.dist-info/METADATA,sha256=4w5fp5admIsLz4trTedAhLYAvDfpqmm_e75ZIs3qsMc,35819
|
|
54
|
+
databricks_sdk-0.29.0.dist-info/NOTICE,sha256=Qnc0m8JjZNTDV80y0h1aJGvsr4GqM63m1nr2VTypg6E,963
|
|
55
|
+
databricks_sdk-0.29.0.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
56
|
+
databricks_sdk-0.29.0.dist-info/top_level.txt,sha256=7kRdatoSgU0EUurRQJ_3F1Nv4EOSHWAr6ng25tJOJKU,11
|
|
57
|
+
databricks_sdk-0.29.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|