|
1 | 1 | ### Create service principal |
2 | 2 |
|
3 | | -1. In your Databrick console, go to the admin settings by clicking your username in the to right corner -> Admin settings (add photo) |
| 3 | +1. Open your Databricks console, and then open your relevant workspace. |
| 4 | + |
| 5 | +2. Click on your Profile icon on the right and choose Settings. |
4 | 6 |
|
5 | 7 | <img |
6 | | - src="https://res.cloudinary.com/diuctyblm/image/upload/f_auto,q_auto/v1/dwh/databricks/admin_settings" |
7 | | - alt="Admin settings" |
| 8 | + src="https://res.cloudinary.com/dgpojk42n/image/upload/v1763312536/databricks_01_choose_settings.png" |
| 9 | + alt="Choose settings" |
8 | 10 | /> |
9 | 11 |
|
10 | | -2. Go to the Service principals tab, then click Add service principal (add photo) |
| 12 | +3. On the sidebar, click on *Identity and access*, and then under the *Service Principals* row click on *Manage*. |
11 | 13 |
|
12 | 14 | <img |
13 | | - src="https://res.cloudinary.com/diuctyblm/image/upload/f_auto,q_auto/v1/dwh/databricks/service_principals_settings" |
14 | | - alt="Service principal settings" |
| 15 | + src="https://res.cloudinary.com/dgpojk42n/image/upload/v1763313131/databricks_02_manage_service_principal_b5gc72.png" |
| 16 | + alt="Choose settings" |
15 | 17 | /> |
16 | 18 |
|
17 | | -3. Give the service principal a good name (e.g elementary) and click Add (add photo) |
| 19 | +4. Click on the *Add service principal* button, choose "Add new" and give a name to the service principal. This will be used by Elementary Cloud |
| 20 | +to access your Databricks instance. |
18 | 21 |
|
19 | 22 | <img |
20 | | - src="https://res.cloudinary.com/diuctyblm/image/upload/f_auto,q_auto/v1/dwh/databricks/add_service_principal" |
| 23 | + src="https://res.cloudinary.com/dgpojk42n/image/upload/v1763313361/databricks_04_add_service_principal_e54raz.png" |
21 | 24 | alt="Add service principal" |
22 | 25 | /> |
23 | 26 |
|
24 | | -4. Then, from the service principal configuration view, copy the Application Id (add photo) |
| 27 | +5. Click on your newly created service principal, add the "Databricks SQL access" entitlement, and click Update. Also, please copy the |
| 28 | +"Application ID" field as it will be used later in the permissions section. |
25 | 29 |
|
26 | 30 | <img |
27 | | - src="https://res.cloudinary.com/diuctyblm/image/upload/f_auto,q_auto/v1/dwh/databricks/service_principal_id" |
28 | | - alt="Service principal ID" |
| 31 | + src="https://res.cloudinary.com/dgpojk42n/image/upload/v1763313542/databricks_05_add_databricks_sql_access_zzdcf7.png" |
| 32 | + alt="Add databricks SQL access" |
29 | 33 | /> |
30 | 34 |
|
31 | | -4. Finally, run the following query: |
| 35 | +6. Next, you may also need to allow Token Usage for this service principal (if it is not allowed for all users). To do so, under the settings menu choose Advanced -> Personal Access Tokens -> Permission Settings. |
| 36 | +Then add the service principal there. |
| 37 | + |
| 38 | +<img |
| 39 | + src="https://res.cloudinary.com/dgpojk42n/image/upload/v1763316575/databricks_06_token_usage_eufjwv.png" |
| 40 | + alt="Add databricks SQL access" |
| 41 | +/> |
32 | 42 |
|
33 | | -``` |
34 | | -GRANT SELECT ON SCHEMA <elementary_schema> TO `<service_principal_id>`; |
35 | | -``` |
| 43 | +7. Create a personal access token for your service principal. For more details, please click [here](https://docs.databricks.com/aws/en/dev-tools/auth/pat#databricks-personal-access-tokens-for-service-principals) |
36 | 44 |
|
37 | | -Make sure to replace the `<elementary_schema>` and `<service_principal_id>` placeholders with the correct values |
| 45 | +8. Finally, in order to enable Elementary's automated monitors feature, please ensure [predictive optimization](https://docs.databricks.com/aws/en/optimizations/predictive-optimization#enable-or-disable-predictive-optimization-for-your-account) is enabled in your account. |
| 46 | +This is required for table statistics to be updated (specifically Elementary needs row count) |
0 commit comments