diff --git a/assets/ai_builder/integrations/databricks_integration_oauth_1.webp b/assets/ai_builder/integrations/databricks_integration_oauth_1.webp new file mode 100644 index 000000000..90d8aab3b Binary files /dev/null and b/assets/ai_builder/integrations/databricks_integration_oauth_1.webp differ diff --git a/assets/ai_builder/integrations/databricks_integration_oauth_2.webp b/assets/ai_builder/integrations/databricks_integration_oauth_2.webp new file mode 100644 index 000000000..8f1dd6982 Binary files /dev/null and b/assets/ai_builder/integrations/databricks_integration_oauth_2.webp differ diff --git a/assets/ai_builder/integrations/databricks_integration_oauth_3.webp b/assets/ai_builder/integrations/databricks_integration_oauth_3.webp new file mode 100644 index 000000000..43dd300da Binary files /dev/null and b/assets/ai_builder/integrations/databricks_integration_oauth_3.webp differ diff --git a/assets/ai_builder/integrations/databricks_integration_oauth_4.webp b/assets/ai_builder/integrations/databricks_integration_oauth_4.webp new file mode 100644 index 000000000..25d73a496 Binary files /dev/null and b/assets/ai_builder/integrations/databricks_integration_oauth_4.webp differ diff --git a/assets/ai_builder/integrations/databricks_integration_oauth_5.webp b/assets/ai_builder/integrations/databricks_integration_oauth_5.webp new file mode 100644 index 000000000..f2f229066 Binary files /dev/null and b/assets/ai_builder/integrations/databricks_integration_oauth_5.webp differ diff --git a/assets/ai_builder/integrations/databricks_integration_oauth_6.webp b/assets/ai_builder/integrations/databricks_integration_oauth_6.webp new file mode 100644 index 000000000..2ddcdafdd Binary files /dev/null and b/assets/ai_builder/integrations/databricks_integration_oauth_6.webp differ diff --git a/assets/ai_builder/integrations/databricks_integration_oauth_7.webp b/assets/ai_builder/integrations/databricks_integration_oauth_7.webp new file mode 100644 index 000000000..261f8cae5 Binary files /dev/null and b/assets/ai_builder/integrations/databricks_integration_oauth_7.webp differ diff --git a/docs/ai_builder/integrations/databricks.md b/docs/ai_builder/integrations/databricks.md index 6705a3ea4..4149c2f70 100644 --- a/docs/ai_builder/integrations/databricks.md +++ b/docs/ai_builder/integrations/databricks.md @@ -50,7 +50,41 @@ rx.el.div( ) ``` -3 - Generate a **Personal Access Token** (**DATABRICKS_TOKEN**): + +3 - Get your **DATABRICKS_CATALOG** and **DATABRICKS_SCHEMA**: + - Click the SQL Editor from the sidebar. + - Choose the **DATABRICKS_CATALOG** and **DATABRICKS_SCHEMA** from the dropdowns as shown below. + + +```python eval +rx.el.div( + image_zoom( + rx.image( + src="/ai_builder/integrations/databricks_integration_4.webp", + class_name="p-2 rounded-md h-auto", + border=f"0.81px solid {rx.color('slate', 5)}", + ), + class_name="rounded-md overflow-hidden", + ), + class_name="w-full flex flex-col rounded-md cursor-pointer", +) +``` + +```python eval +rx.box(height="2rem") +``` + +4 - Obtain your authentication credentials: + +There are two methods to authenticate your app with Databricks: using a **Personal Access Token** or via **OAuth**. Choose one of the methods below to obtain the necessary credentials. + + +---md tabs + +--tab Personal Access Token +## Generate a Personal Access Token (DATABRICKS_TOKEN) + + - Click on your profile icon → **Settings**. - Click **Developer**. - Click **Manage** in Access Tokens. @@ -86,16 +120,21 @@ rx.el.div( ) ``` -4 - Get your **DATABRICKS_CATALOG** and **DATABRICKS_SCHEMA**: - - Click the SQL Editor from the sidebar. - - Choose the **DATABRICKS_CATALOG** and **DATABRICKS_SCHEMA** from the dropdowns as shown below. + + + +-- +--tab OAuth +## Use OAuth (DATABRICKS_CLIENT_ID and DATABRICKS_CLIENT_SECRET) + +- Open the dropdown in the top right corner and select **Manage Account**. ```python eval rx.el.div( image_zoom( rx.image( - src="/ai_builder/integrations/databricks_integration_4.webp", + src="/ai_builder/integrations/databricks_integration_oauth_1.webp", class_name="p-2 rounded-md h-auto", border=f"0.81px solid {rx.color('slate', 5)}", ), @@ -105,6 +144,107 @@ rx.el.div( ) ``` +- Select `Users and Groups` + +```python eval +rx.el.div( + image_zoom( + rx.image( + src="/ai_builder/integrations/databricks_integration_oauth_2.webp", + class_name="p-2 rounded-md h-auto", + border=f"0.81px solid {rx.color('slate', 5)}", + ), + class_name="rounded-md overflow-hidden", + ), + class_name="w-full flex flex-col rounded-md cursor-pointer", +) +``` + +- Select the `Service Principals` tab and click `Add Service Principal`. + +```python eval +rx.el.div( + image_zoom( + rx.image( + src="/ai_builder/integrations/databricks_integration_oauth_3.webp", + class_name="p-2 rounded-md h-auto", + border=f"0.81px solid {rx.color('slate', 5)}", + ), + class_name="rounded-md overflow-hidden", + ), + class_name="w-full flex flex-col rounded-md cursor-pointer", +) +``` + +- Fill in the details and click `Add Service Principal`. + +```python eval +rx.el.div( + image_zoom( + rx.image( + src="/ai_builder/integrations/databricks_integration_oauth_4.webp", + class_name="p-2 rounded-md h-auto", + border=f"0.81px solid {rx.color('slate', 5)}", + ), + class_name="rounded-md overflow-hidden", + ), + class_name="w-full flex flex-col rounded-md cursor-pointer", +) +``` + +- Click the `Credentials and Secrets` tab and click `Generate Secret`. + + +```python eval +rx.el.div( + image_zoom( + rx.image( + src="/ai_builder/integrations/databricks_integration_oauth_5.webp", + class_name="p-2 rounded-md h-auto", + border=f"0.81px solid {rx.color('slate', 5)}", + ), + class_name="rounded-md overflow-hidden", + ), + class_name="w-full flex flex-col rounded-md cursor-pointer", +) +``` + +- Set a lifetime for the secrets and click `Generate`. + +```python eval +rx.el.div( + image_zoom( + rx.image( + src="/ai_builder/integrations/databricks_integration_oauth_6.webp", + class_name="p-2 rounded-md h-auto", + border=f"0.81px solid {rx.color('slate', 5)}", + ), + class_name="rounded-md overflow-hidden", + ), + class_name="w-full flex flex-col rounded-md cursor-pointer", +) +``` + +- Copy the generated **DATABRICKS_CLIENT_ID** and **DATABRICKS_CLIENT_SECRET**. + +```python eval +rx.el.div( + image_zoom( + rx.image( + src="/ai_builder/integrations/databricks_integration_oauth_7.webp", + class_name="p-2 rounded-md h-auto", + border=f"0.81px solid {rx.color('slate', 5)}", + ), + class_name="rounded-md overflow-hidden", + ), + class_name="w-full flex flex-col rounded-md cursor-pointer", +) +``` + +-- + +--- + ## Step 2: Configure the Integration in Your App