Skip to content

Commit

Permalink
Release v0.3.1 (#261)
Browse files Browse the repository at this point in the history
* Added timeout to `w.clusters.ensure_cluster_running()`
([#227](#227)).
* Fixed `debug_headers` type hints for `WorkspaceClient` and
`AccountClient`
([#258](#258)).
* Made dbutils typecast use a valid type variable
([#259](#259)).
  • Loading branch information
mgyucht authored Aug 2, 2023
1 parent c1c0886 commit 38b289c
Show file tree
Hide file tree
Showing 16 changed files with 68 additions and 36 deletions.
15 changes: 10 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ examples/log_delivery/list_log_delivery.py linguist-generated=true
examples/metastores/assign_metastores.py linguist-generated=true
examples/metastores/create_metastores.py linguist-generated=true
examples/metastores/current_metastores.py linguist-generated=true
examples/metastores/enable_optimization_metastores.py linguist-generated=true
examples/metastores/get_metastores.py linguist-generated=true
examples/metastores/list_metastores.py linguist-generated=true
examples/metastores/maintenance_metastores.py linguist-generated=true
examples/metastores/summary_metastores.py linguist-generated=true
examples/metastores/unassign_metastores.py linguist-generated=true
examples/metastores/update_metastores.py linguist-generated=true
Expand Down Expand Up @@ -180,6 +180,7 @@ examples/queries/create_alerts.py linguist-generated=true
examples/queries/create_queries.py linguist-generated=true
examples/queries/get_queries.py linguist-generated=true
examples/queries/update_queries.py linguist-generated=true
examples/query_history/list_sql_query_history.py linguist-generated=true
examples/recipients/create_recipients.py linguist-generated=true
examples/recipients/get_recipients.py linguist-generated=true
examples/recipients/list_recipients.py linguist-generated=true
Expand Down Expand Up @@ -235,12 +236,16 @@ examples/token_management/list_create_obo_token_on_aws.py linguist-generated=tru
examples/tokens/create_tokens.py linguist-generated=true
examples/tokens/get_tokens.py linguist-generated=true
examples/tokens/list_tokens.py linguist-generated=true
examples/users/create_account_users.py linguist-generated=true
examples/users/create_clusters_api_integration.py linguist-generated=true
examples/users/create_users.py linguist-generated=true
examples/users/create_workspace_users.py linguist-generated=true
examples/users/delete_account_users.py linguist-generated=true
examples/users/delete_clusters_api_integration.py linguist-generated=true
examples/users/delete_users.py linguist-generated=true
examples/users/get_users.py linguist-generated=true
examples/users/list_users.py linguist-generated=true
examples/users/delete_workspace_users.py linguist-generated=true
examples/users/get_account_users.py linguist-generated=true
examples/users/get_workspace_users.py linguist-generated=true
examples/users/list_workspace_users.py linguist-generated=true
examples/users/patch_account_users.py linguist-generated=true
examples/volumes/create_volumes.py linguist-generated=true
examples/volumes/list_volumes.py linguist-generated=true
examples/volumes/read_volumes.py linguist-generated=true
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Version changelog

## 0.3.1

* Added timeout to `w.clusters.ensure_cluster_running()` ([#227](https://github.com/databricks/databricks-sdk-py/pull/227)).
* Fixed `debug_headers` type hints for `WorkspaceClient` and `AccountClient` ([#258](https://github.com/databricks/databricks-sdk-py/pull/258)).
* Made dbutils typecast use a valid type variable ([#259](https://github.com/databricks/databricks-sdk-py/pull/259)).


## 0.3.0

* Fixed serialization of lists of enum values ([#248](https://github.com/databricks/databricks-sdk-py/pull/248)).
Expand Down
1 change: 1 addition & 0 deletions databricks/sdk/service/sql.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion databricks/sdk/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.3.0'
__version__ = '0.3.1'
10 changes: 5 additions & 5 deletions docs/account/users.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Account Users
user = a.users.create(display_name=f'sdk-{time.time_ns()}', user_name=f'sdk-{time.time_ns()}@example.com')
# cleanup
a.users.delete(delete=user.id)
a.users.delete(id=user.id)
Create a new user.

Expand Down Expand Up @@ -94,10 +94,10 @@ Account Users
user = a.users.create(display_name=f'sdk-{time.time_ns()}', user_name=f'sdk-{time.time_ns()}@example.com')
by_id = a.users.get(get=user.id)
by_id = a.users.get(id=user.id)
# cleanup
a.users.delete(delete=user.id)
a.users.delete(id=user.id)
Get user details.

Expand Down Expand Up @@ -168,14 +168,14 @@ Account Users
user = a.users.create(display_name=f'sdk-{time.time_ns()}', user_name=f'sdk-{time.time_ns()}@example.com')
a.users.patch(id=user.id,
schema=[iam.PatchSchema.URN_IETF_PARAMS_SCIM_API_MESSAGES20_PATCH_OP],
schema=[iam.PatchSchema.URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_PATCH_OP],
operations=[
iam.Patch(op=iam.PatchOp.ADD,
value=iam.User(roles=[iam.ComplexValue(value="account_admin")]))
])
# cleanup
a.users.delete(delete=user.id)
a.users.delete(id=user.id)
Update user details.

Expand Down
12 changes: 6 additions & 6 deletions docs/workspace/permissions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ Permissions
obj = w.workspace.get_status(path=notebook_path)
w.permissions.set(request_object_type="notebooks",
request_object_id="%d" % (obj.object_id),
access_control_list=[
iam.AccessControlRequest(group_name=group.display_name,
permission_level=iam.PermissionLevel.CAN_RUN)
])
_ = w.permissions.set(request_object_type="notebooks",
request_object_id="%d" % (obj.object_id),
access_control_list=[
iam.AccessControlRequest(group_name=group.display_name,
permission_level=iam.PermissionLevel.CAN_RUN)
])
# cleanup
w.groups.delete(id=group.id)
Expand Down
12 changes: 12 additions & 0 deletions docs/workspace/query_history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ Query History

.. py:method:: list( [, filter_by, include_metrics, max_results, page_token])
Usage:

.. code-block::
from databricks.sdk import WorkspaceClient
from databricks.sdk.service import sql
w = WorkspaceClient()
_ = w.query_history.list(filter_by=sql.QueryFilter(
query_start_time_range=sql.TimeRange(start_time_ms=1690243200000, end_time_ms=1690329600000)))
List Queries.

List the history of queries through SQL warehouses.
Expand Down
10 changes: 5 additions & 5 deletions docs/workspace/users.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Users
user = a.users.create(display_name=f'sdk-{time.time_ns()}', user_name=f'sdk-{time.time_ns()}@example.com')
# cleanup
a.users.delete(delete=user.id)
a.users.delete(id=user.id)
Create a new user.

Expand Down Expand Up @@ -94,10 +94,10 @@ Users
user = a.users.create(display_name=f'sdk-{time.time_ns()}', user_name=f'sdk-{time.time_ns()}@example.com')
by_id = a.users.get(get=user.id)
by_id = a.users.get(id=user.id)
# cleanup
a.users.delete(delete=user.id)
a.users.delete(id=user.id)
Get user details.

Expand Down Expand Up @@ -168,14 +168,14 @@ Users
user = a.users.create(display_name=f'sdk-{time.time_ns()}', user_name=f'sdk-{time.time_ns()}@example.com')
a.users.patch(id=user.id,
schema=[iam.PatchSchema.URN_IETF_PARAMS_SCIM_API_MESSAGES20_PATCH_OP],
schema=[iam.PatchSchema.URN_IETF_PARAMS_SCIM_API_MESSAGES_2_0_PATCH_OP],
operations=[
iam.Patch(op=iam.PatchOp.ADD,
value=iam.User(roles=[iam.ComplexValue(value="account_admin")]))
])
# cleanup
a.users.delete(delete=user.id)
a.users.delete(id=user.id)
Update user details.

Expand Down
12 changes: 6 additions & 6 deletions examples/permissions/set_generic_permissions.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions examples/query_history/list_sql_query_history.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/users/create_account_users.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/users/delete_account_users.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/users/delete_workspace_users.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/users/get_account_users.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/users/get_workspace_users.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/users/patch_account_users.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 38b289c

Please sign in to comment.