Skip to content

Commit d1ebc24

Browse files
committed
update databricks source setup page
1 parent e1603bb commit d1ebc24

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

src/connections/reverse-etl/reverse-etl-source-setup-guides/databricks-setup.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,33 @@ title: Databricks Reverse ETL Setup
44

55
Set up Databricks as your Reverse ETL source.
66

7-
At a high level, when you set up Databricks for Reverse ETL, the configured user needs read permissions for any resources (databases, schemas, tables) the query needs to access. Segment keeps track of changes to your query results with a managed schema (`__SEGMENT_REVERSE_ETL`), which requires the configured user to allow write permissions for that schema.
7+
At a high level, when you set up Databricks for Reverse ETL, the configured service-principal needs read permissions for any resources (databases, schemas, tables) the query needs to access. Segment keeps track of changes to your query results with a managed schema (`__SEGMENT_REVERSE_ETL`), which requires the configured service-principal to allow write permissions for that schema.
8+
9+
> info ""
10+
> Segment supports only OAuth (M2M) authentication. To generate client ID and Secret, follow the steps listed in the [Databricks docs: OAuth machine-to-machine (M2M) authentication](https://docs.databricks.com/en/dev-tools/auth/oauth-m2m.html){:target="_blank"}.
11+
812

913
## Required permissions
10-
* Make sure the user or the service principal you use to connect to Segment has permissions to use that warehouse. In the Databricks console go to **SQL warehouses** and select the warehouse you're using. Navigate to **Overview > Permissions** and make sure the user or the service principal you use to connect to Segment has *can use* permissions.
14+
* Make sure the service principal you use to connect to Segment has permissions to use that warehouse. In the Databricks console go to **SQL warehouses** and select the warehouse you're using. Navigate to **Overview > Permissions** and make sure the service principal you use to connect to Segment has *can use* permissions.
1115

1216
* To grant access to read data from the tables used in the model query, run:
1317

1418
```
15-
GRANT USAGE ON SCHEMA <schema_name> TO `<user or service principal you are using to connect to Segment>`;
16-
GRANT SELECT, READ_METADATA ON SCHEMA <schema_name> TO `<user or service principal you are using to connect to Segment>`;
19+
GRANT USAGE ON SCHEMA <schema_name> TO `<service principal you are using to connect to Segment>`;
20+
GRANT SELECT, READ_METADATA ON SCHEMA <schema_name> TO `<service principal you are using to connect to Segment>`;
1721
```
1822
1923
* To grant Segment access to create a schema to keep track of the running syncs, run:
2024
2125
```
22-
GRANT CREATE on catalog <name of the catalog, usually hive_metastore or main if using unity-catalog> TO `<user or service principal you are using to connect to Segment>`;
26+
GRANT CREATE on catalog <name of the catalog, usually hive_metastore or main if using unity-catalog> TO `<service principal you are using to connect to Segment>`;
2327
```
2428
2529
* If you want to create the schema yourself instead and then give Segment access to it, run:
2630
2731
```
2832
CREATE SCHEMA IF NOT EXISTS __segment_reverse_etl;
29-
GRANT ALL PRIVILEGES ON SCHEMA __segment_reverse_etl TO `<user or service principal you are using to connect to Segment>`;
33+
GRANT ALL PRIVILEGES ON SCHEMA __segment_reverse_etl TO `<service principal you are using to connect to Segment>`;
3034
```
3135
3236
## Set up guide
@@ -46,12 +50,14 @@ To set up Databricks as your Reverse ETL source:
4650
* Hostname: `adb-xxxxxxx.azuredatabricks.net`
4751
* Http Path: `/sql/1.0/warehouses/xxxxxxxxx`
4852
* Port: `443` (default)
49-
* Token: `<your-token>`
50-
* Catalog [optional]: `hive_metastore` (default)
53+
* Service principal client ID: `<your client ID>`
54+
* OAuth secret: `<OAuth secret to be used during connection>`
55+
* Catalog [optional]: `<if not specify, Segment will use the default catalog>`
5156
11. Click **Test Connection** to see if the connection works. If the connection fails, make sure you have the right permissions and credentials, then try again.
5257
12. Click **Add source** if the test connection is successful.
5358
54-
> info ""
55-
> To generate a token, follow the steps listed in the [Databricks docs](https://docs.databricks.com/dev-tools/auth.html#pat){:target="_blank"}. Segment recommends you create a token with no expiration date by leaving the lifetime field empty when creating it. If you already have a token with an expiration date, be sure to keep track of the date and renew it on time.
59+
> warning ""
60+
> Segment previously supported token-based authentication, but the authentication method has been changed based on Databricks' recommendation.
61+
> If you set up your source in the past using a token, it will still be supported; however, for new source or for updating the connection settings of an existing source, we will only support [OAuth machine-to-machine (M2M) authentication](https://docs.databricks.com/en/dev-tools/auth/oauth-m2m.html){:target="_blank"}.
5662
5763
Once you've succesfully added your Databricks source, [add a model](/docs/connections/reverse-etl/#step-2-add-a-model) and follow the rest of the steps in the Reverse ETL setup guide.

0 commit comments

Comments
 (0)