Skip to content

Commit 0552990

Browse files
jackyhu-dbJesse Whitehouse
and
Jesse Whitehouse
authored
Update some outdated OAuth comments (#339)
Signed-off-by: Jacky Hu <[email protected]> Signed-off-by: Jesse Whitehouse <[email protected]> Co-authored-by: Jesse Whitehouse <[email protected]>
1 parent faf13a4 commit 0552990

File tree

4 files changed

+8
-34
lines changed

4 files changed

+8
-34
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release History
22

3+
# 3.0.3 (TBD)
4+
5+
- Revised docstrings and examples for OAuth (#339)
6+
37
# 3.0.2 (2024-01-25)
48

59
- SQLAlchemy dialect now supports table and column comments (thanks @cbornet!)

examples/interactive_oauth.py

+2-15
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,16 @@
11
from databricks import sql
22
import os
33

4-
"""Bring Your Own Identity Provider with fined grained OAuth scopes is currently public preview on
5-
Databricks in AWS. databricks-sql-connector supports user to machine OAuth login which means the
6-
end user has to be present to login in a browser which will be popped up by the Python process. You
7-
must enable OAuth in your Databricks account to run this example. More information on how to enable
8-
OAuth in your Databricks Account in AWS can be found here:
9-
10-
https://docs.databricks.com/administration-guide/account-settings-e2/single-sign-on.html
4+
"""databricks-sql-connector supports user to machine OAuth login which means the
5+
end user has to be present to login in a browser which will be popped up by the Python process.
116
127
Pre-requisites:
13-
- You have a Databricks account in AWS.
14-
- You have configured OAuth in Databricks account in AWS using the link above.
158
- You have installed a browser (Chrome, Firefox, Safari, Internet Explorer, etc) that will be
169
accessible on the machine for performing OAuth login.
1710
1811
This code does not persist the auth token. Hence after the Python process terminates the
1912
end user will have to login again. See examples/persistent_oauth.py to learn about persisting the
2013
token across script executions.
21-
22-
Bring Your Own Identity Provider is in public preview. The API may change prior to becoming GA.
23-
You can monitor these two links to find out when it will become generally available:
24-
25-
1. https://docs.databricks.com/administration-guide/account-settings-e2/single-sign-on.html
26-
2. https://docs.databricks.com/dev-tools/python-sql-connector.html
2714
"""
2815

2916
with sql.connect(server_hostname = os.getenv("DATABRICKS_SERVER_HOSTNAME"),

examples/persistent_oauth.py

+2-15
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
"""Bring Your Own Identity Provider with fined grained OAuth scopes is currently public preview on
2-
Databricks in AWS. databricks-sql-connector supports user to machine OAuth login which means the
3-
end user has to be present to login in a browser which will be popped up by the Python process. You
4-
must enable OAuth in your Databricks account to run this example. More information on how to enable
5-
OAuth in your Databricks Account in AWS can be found here:
6-
7-
https://docs.databricks.com/administration-guide/account-settings-e2/single-sign-on.html
1+
"""databricks-sql-connector supports user to machine OAuth login which means the
2+
end user has to be present to login in a browser which will be popped up by the Python process.
83
94
Pre-requisites:
10-
- You have a Databricks account in AWS.
11-
- You have configured OAuth in Databricks account in AWS using the link above.
125
- You have installed a browser (Chrome, Firefox, Safari, Internet Explorer, etc) that will be
136
accessible on the machine for performing OAuth login.
147
@@ -18,12 +11,6 @@
1811
shows which methods you may implement.
1912
2013
For this example, the DevOnlyFilePersistence class is provided. Do not use this in production.
21-
22-
Bring Your Own Identity Provider is in public preview. The API may change prior to becoming GA.
23-
You can monitor these two links to find out when it will become generally available:
24-
25-
1. https://docs.databricks.com/administration-guide/account-settings-e2/single-sign-on.html
26-
2. https://docs.databricks.com/dev-tools/python-sql-connector.html
2714
"""
2815

2916
import os

src/databricks/sql/client.py

-4
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@ def __init__(
9797
a warning log message. To suppress this log message, set `use_inline_params="silent"`.
9898
auth_type: `str`, optional
9999
`databricks-oauth` : to use oauth with fine-grained permission scopes, set to `databricks-oauth`.
100-
This is currently in private preview for Databricks accounts on AWS.
101-
This supports User to Machine OAuth authentication for Databricks on AWS with
102-
any IDP configured. This is only for interactive python applications and open a browser window.
103-
Note this is beta (private preview)
104100
105101
oauth_client_id: `str`, optional
106102
custom oauth client_id. If not specified, it will use the built-in client_id of databricks-sql-python.

0 commit comments

Comments
 (0)