Skip to content

Commit 0b9a0b4

Browse files
author
phoenix
committed
Update SDK to 83ba5645aa5cf53f39008962d6ff4e64c07ba02b
1 parent ad941ec commit 0b9a0b4

File tree

17 files changed

+93
-70
lines changed

17 files changed

+93
-70
lines changed

.codegen/_openapi_sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8f5eedbc991c4f04ce1284406577b0c92d59a224
1+
83ba5645aa5cf53f39008962d6ff4e64c07ba02b

databricks/sdk/service/catalog.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

databricks/sdk/service/compute.py

Lines changed: 6 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

databricks/sdk/service/sql.py

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/account/iam/workspace_assignment.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
4444
a = AccountClient()
4545
46-
workspace_id = os.environ["TEST_WORKSPACE_ID"]
46+
workspace_id = os.environ["DUMMY_WORKSPACE_ID"]
4747
48-
all = a.workspace_assignment.list(list=workspace_id)
48+
all = a.workspace_assignment.list(workspace_id=workspace_id)
4949
5050
Get the permission assignments for the specified Databricks account and Databricks workspace.
5151

@@ -74,9 +74,9 @@
7474
7575
spn_id = spn.id
7676
77-
workspace_id = os.environ["TEST_WORKSPACE_ID"]
77+
workspace_id = os.environ["DUMMY_WORKSPACE_ID"]
7878
79-
a.workspace_assignment.update(
79+
_ = a.workspace_assignment.update(
8080
workspace_id=workspace_id,
8181
principal_id=spn_id,
8282
permissions=[iam.WorkspacePermission.USER],

docs/account/provisioning/storage.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
.. code-block::
1818
19+
import os
1920
import time
2021
2122
from databricks.sdk import AccountClient
@@ -25,8 +26,11 @@
2526
2627
storage = a.storage.create(
2728
storage_configuration_name=f"sdk-{time.time_ns()}",
28-
root_bucket_info=provisioning.RootBucketInfo(bucket_name=f"sdk-{time.time_ns()}"),
29+
root_bucket_info=provisioning.RootBucketInfo(bucket_name=os.environ["TEST_ROOT_BUCKET"]),
2930
)
31+
32+
# cleanup
33+
a.storage.delete(storage_configuration_id=storage.storage_configuration_id)
3034
3135
Creates a Databricks storage configuration for an account.
3236

docs/dbdataclasses/catalog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ These dataclasses are used in the SDK to represent API requests and responses fo
14971497

14981498
.. py:class:: SecurableKind
14991499
1500-
Latest kind: SECRET_EXTERNAL_AWS_SECRETS_MANAGER = 273; Next id:274
1500+
Latest kind: CREDENTIAL_STORAGE_UC_CONNECTION = 275; Next id:276
15011501

15021502
.. py:attribute:: TABLE_DB_STORAGE
15031503
:value: "TABLE_DB_STORAGE"

docs/workspace/catalog/catalogs.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
2525
w = WorkspaceClient()
2626
27-
created_catalog = w.catalogs.create(name=f"sdk-{time.time_ns()}")
27+
new_catalog = w.catalogs.create(name=f"sdk-{time.time_ns()}")
2828
2929
# cleanup
30-
w.catalogs.delete(name=created_catalog.name, force=True)
30+
w.catalogs.delete(name=new_catalog.name, force=True)
3131
3232
Creates a new catalog instance in the parent metastore if the caller is a metastore admin or has the
3333
**CREATE_CATALOG** privilege.
@@ -155,13 +155,12 @@
155155
import time
156156
157157
from databricks.sdk import WorkspaceClient
158-
from databricks.sdk.service import catalog
159158
160159
w = WorkspaceClient()
161160
162161
created = w.catalogs.create(name=f"sdk-{time.time_ns()}")
163162
164-
_ = w.catalogs.update(name=created.name, isolation_mode=catalog.CatalogIsolationMode.ISOLATED)
163+
_ = w.catalogs.update(name=created.name, comment="updated")
165164
166165
# cleanup
167166
w.catalogs.delete(name=created.name, force=True)

docs/workspace/catalog/external_locations.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,20 @@
105105
106106
credential = w.storage_credentials.create(
107107
name=f"sdk-{time.time_ns()}",
108-
aws_iam_role=catalog.AwsIamRoleRequest(role_arn=os.environ["TEST_METASTORE_DATA_ACCESS_ARN"]),
108+
aws_iam_role=catalog.AwsIamRole(role_arn=os.environ["TEST_METASTORE_DATA_ACCESS_ARN"]),
109109
)
110110
111111
created = w.external_locations.create(
112112
name=f"sdk-{time.time_ns()}",
113113
credential_name=credential.name,
114-
url="s3://%s/%s" % (os.environ["TEST_BUCKET"], f"sdk-{time.time_ns()}"),
114+
url=f's3://{os.environ["TEST_BUCKET"]}/sdk-{time.time_ns()}',
115115
)
116116
117-
_ = w.external_locations.get(name=created.name)
117+
_ = w.external_locations.get(get=created.name)
118118
119119
# cleanup
120-
w.storage_credentials.delete(name=credential.name)
121-
w.external_locations.delete(name=created.name)
120+
w.storage_credentials.delete(delete=credential.name)
121+
w.external_locations.delete(delete=created.name)
122122
123123
Gets an external location from the metastore. The caller must be either a metastore admin, the owner
124124
of the external location, or a user that has some privilege on the external location.
@@ -140,11 +140,10 @@
140140
.. code-block::
141141
142142
from databricks.sdk import WorkspaceClient
143-
from databricks.sdk.service import catalog
144143
145144
w = WorkspaceClient()
146145
147-
all = w.external_locations.list(catalog.ListExternalLocationsRequest())
146+
all = w.external_locations.list()
148147
149148
Gets an array of external locations (__ExternalLocationInfo__ objects) from the metastore. The caller
150149
must be a metastore admin, the owner of the external location, or a user that has some privilege on

docs/workspace/catalog/schemas.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
2323
w = WorkspaceClient()
2424
25-
created_catalog = w.catalogs.create(name=f"sdk-{time.time_ns()}")
25+
new_catalog = w.catalogs.create(name=f"sdk-{time.time_ns()}")
2626
27-
created_schema = w.schemas.create(name=f"sdk-{time.time_ns()}", catalog_name=created_catalog.name)
27+
created = w.schemas.create(name=f"sdk-{time.time_ns()}", catalog_name=new_catalog.name)
2828
2929
# cleanup
30-
w.catalogs.delete(name=created_catalog.name, force=True)
31-
w.schemas.delete(full_name=created_schema.full_name)
30+
w.catalogs.delete(name=new_catalog.name, force=True)
31+
w.schemas.delete(full_name=created.full_name)
3232
3333
Creates a new schema for catalog in the Metastore. The caller must be a metastore admin, or have the
3434
**CREATE_SCHEMA** privilege in the parent catalog.

0 commit comments

Comments
 (0)