Skip to content

Commit cbe3a7e

Browse files
committed
📝 Doc: sync docs to readme
1 parent 71bf97c commit cbe3a7e

File tree

1 file changed

+41
-37
lines changed

1 file changed

+41
-37
lines changed

docs/README.md

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ grafana/grafana
6565

6666
To configure the plugin use the values provided under JDBC/ODBC in the advanced options of the Databricks Cluster (or SQL Warehouse) and the the Credentials according to the chosen Authentication Method.
6767

68-
You can either authenticate the plugin using a [Personal Access Token (PAT)](https://docs.databricks.com/en/dev-tools/auth/pat.html), via [Databricks M2M OAuth](https://docs.databricks.com/en/dev-tools/auth/oauth-m2m.html) using a Service Principal Client ID and Client Secret or by using an external OAuth Client Credential Endpoint which returns a Databricks token (the OAuth endpoint should implement the default [OAuth Client Credential Grant](https://datatracker.ietf.org/doc/html/rfc6749#section-4.4)) i.e. Azure Entra (OAuth2 Endpoint `https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token` & Scope `2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/.default`).
68+
##### Authentication Methods
69+
- [Personal Access Token (PAT)](https://docs.databricks.com/en/dev-tools/auth/pat.html)
70+
- [Databricks M2M OAuth](https://docs.databricks.com/en/dev-tools/auth/oauth-m2m.html) using a Service Principal Client ID and Client Secret
71+
- External OAuth Client Credential Endpoint which returns a Databricks token (the OAuth endpoint should implement the default [OAuth Client Credential Grant](https://datatracker.ietf.org/doc/html/rfc6749#section-4.4)) i.e. Azure Entra (OAuth2 Endpoint `https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token` & Scope `2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/.default`)
72+
- Azure Entra Pass Thru, which uses the Entra Auth token from the signed in user (IMPORTANT: `2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/.default` has to be added to the scopes of the Entra Auth configuration in Grafana!). Additionally the plugin won't work with this option selected if the user is not signed in via Azure Entra SSO and for backend Grafana Tasks (e.g.Alerting).
6973

7074
![img_1.png](img/config_editor.png)
7175

@@ -76,7 +80,7 @@ Available configuration fields are as follows:
7680
| Server Hostname | Databricks Server Hostname (without http). i.e. `XXX.cloud.databricks.com` |
7781
| Server Port | Databricks Server Port (default `443`) |
7882
| HTTP Path | HTTP Path value for the existing cluster or SQL warehouse. i.e. `sql/1.0/endpoints/XXX` |
79-
| Authentication Method | PAT (Personal Access Token), M2M (Machine to Machine) OAuth or OAuth2 Client Credentials Authentication |
83+
| Authentication Method | PAT (Personal Access Token), M2M (Machine to Machine) OAuth, OAuth2 Client Credentials Authentication or Azure Entra Pass Thru |
8084
| Client ID | Databricks Service Principal Client ID. (only if OAuth / OAuth2 is chosen as Auth Method) |
8185
| Client Secret | Databricks Service Principal Client Secret. (only if OAuth / OAuth2 is chosen as Auth Method) |
8286
| Access Token | Personal Access Token for Databricks. (only if PAT is chosen as Auth Method) |
@@ -102,32 +106,32 @@ The Datasource configuration can also be done via a YAML file as described [here
102106

103107
```yaml
104108
datasources:
105-
- name: Databricks
106-
type: mullerpeter-databricks-datasource
107-
isDefault: true
108-
jsonData:
109-
hostname: XXX.cloud.databricks.com
110-
httpPath: sql/1.0/endpoints/XXX
111-
port: 443
112-
authenticationMethod: dsn (=PAT) | m2m | oauth2_client_credentials
113-
clientId: ...
114-
externalCredentialsUrl: ...
115-
oauthScopes: api,read
116-
timeInterval: 1m
117-
maxOpenConns: 0
118-
maxIdleConns: 0
119-
connMaxLifetime: 3600
120-
connMaxIdleTime: 3600
121-
retries: 3
122-
retryBackoff: 1
123-
maxRetryDuration: 60
124-
timeout: 60
125-
maxRows: 10000
126-
defaultQueryFormat: table | time_series
127-
defaultEditorMode: builder | code
128-
secureJsonData:
129-
clientSecret: ...
130-
token: ...
109+
- name: Databricks
110+
type: mullerpeter-databricks-datasource
111+
isDefault: true
112+
jsonData:
113+
hostname: XXX.cloud.databricks.com
114+
httpPath: sql/1.0/endpoints/XXX
115+
port: 443
116+
authenticationMethod: dsn (=PAT) | m2m | oauth2_client_credentials | azure_entra_pass_thru
117+
clientId: ...
118+
externalCredentialsUrl: ...
119+
oauthScopes: api,read
120+
timeInterval: 1m
121+
maxOpenConns: 0
122+
maxIdleConns: 0
123+
connMaxLifetime: 3600
124+
connMaxIdleTime: 3600
125+
retries: 3
126+
retryBackoff: 1
127+
maxRetryDuration: 60
128+
timeout: 60
129+
maxRows: 10000
130+
defaultQueryFormat: table | time_series
131+
defaultEditorMode: builder | code
132+
secureJsonData:
133+
clientSecret: ...
134+
token: ...
131135
```
132136
### Supported Macros
133137
@@ -159,7 +163,7 @@ You can write a query in two ways: using the visual query builder or the code ed
159163

160164
### Visual Query Builder
161165

162-
Simple queries can be created using the visual query builder. The visual query builder will automatically fetch the avaible catalogs, schemas, tables & columns from the Databricks Instance. The build query will be displayed in the preview window.
166+
Simple queries can be created using the visual query builder. The visual query builder will automatically fetch the avaible catalogs, schemas, tables & columns from the Databricks Instance. The build query will be displayed in the preview window.
163167

164168
Support for complex queries is limited, for more complex queries use the code editor, which also supports all available macros.
165169

@@ -194,18 +198,18 @@ GROUP BY
194198

195199
```sql
196200
SELECT
197-
window.start,
198-
avg(CAST(o_totalprice AS DOUBLE)),
199-
o_orderstatus
201+
window.start,
202+
avg(CAST(o_totalprice AS DOUBLE)),
203+
o_orderstatus
200204
FROM
201-
samples.tpch.orders
205+
samples.tpch.orders
202206
WHERE
203-
$__timeFilter(o_orderdate)
207+
$__timeFilter(o_orderdate)
204208
GROUP BY
205-
$__timeWindow(o_orderdate),
206-
o_orderstatus
209+
$__timeWindow(o_orderdate),
210+
o_orderstatus
207211
ORDER BY
208-
start;
212+
start;
209213
```
210214

211215
# Development

0 commit comments

Comments
 (0)