{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["platform-badges","admonition","img"]},"type":"markdown"},"seo":{"title":"Treasure AI Studio - Connect Databricks","description":"Connect Treasure AI Studio to Databricks so agents can explore and visualize your lakehouse data. Set up the Databricks OAuth application, configure the connector, and authorize your connection.","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"connect-databricks","__idx":0},"children":["Connect Databricks"]},{"$$mdtype":"Tag","name":"PlatformBadges","attributes":{"platforms":["Web","Desktop"]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Databricks connector lets Treasure AI Studio agents explore and visualize data in your Databricks lakehouse during a chat. Setup has three parts: an administrator creates an OAuth application in Databricks, configures the connector in Treasure AI, and then each user authorizes their own connection."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"New to connections?"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Read ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/connections"},"children":["Connections"]}," first for the general model — the difference between a connector and a connection, and the administrator vs. user roles. This page covers the Databricks-specific steps."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"objective","__idx":1},"children":["Objective"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set up the Databricks connector end to end: create the Databricks OAuth application, configure and enable the connector in Treasure AI, and authorize a connection so the agent can query your lakehouse."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":2},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Account administrator privileges in Treasure AI Studio (for the connector configuration steps)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A Databricks account with permission to create OAuth applications in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://accounts.cloud.databricks.com"},"children":["Account Console"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The workspace URL of the Databricks workspace you want to connect"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1--create-an-oauth-application-in-databricks-administrator","__idx":3},"children":["Step 1 — Create an OAuth Application in Databricks (Administrator)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure AI connects to Databricks using a user-to-machine (U2M) OAuth application that you create in the Databricks Account Console."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Log in to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://accounts.cloud.databricks.com"},"children":["Databricks Account Console"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Go to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Workspaces"]},", click your workspace, and note its ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["URL"]}," (for example, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://dbc-xxxxxxxx-xxxx.cloud.databricks.com"]},"). You'll enter this as the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Workspace URL"]}," in Treasure AI."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Still in the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Account Console"]},", go to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings → App connections → Add connection"]}," and fill in the form:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Application Name"]}," — any name (for example, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Treasure AI"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Redirect URLs"]}," — the callback URL shown in the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Setup Guide"]}," on the Treasure AI connector form (it ends in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/connections/callback"]},"). Copy it exactly from that form, since it is specific to your region."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Access scopes"]}," — check ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["All APIs"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Client secret"]}," — check ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Generate a client secret"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Access token TTL"]}," — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["60"]}," (default)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Refresh token TTL"]}," — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["10080"]}," (default)."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Add"]},", then copy the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Client ID"]}," and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Client Secret"]}," immediately — the secret cannot be retrieved later."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more detail, see Databricks' guide on ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.databricks.com/aws/en/integrations/enable-disable-oauth"},"children":["enabling custom OAuth applications"]},"."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Save the client secret now"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Databricks shows the client secret only once. Copy it before leaving the page; if you lose it, you'll need to generate a new application."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2--configure-the-connector-in-treasure-ai-administrator","__idx":4},"children":["Step 2 — Configure the Connector in Treasure AI (Administrator)"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In Treasure AI Studio, open ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings → Connector Settings"]}," (under ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Organization"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Add Connector"]}," and choose ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Databricks"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Complete the form:"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Workspace URL"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your workspace URL from Step 1, e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://mycompany.cloud.databricks.com"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Client ID"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Client ID from the Databricks OAuth application."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Client Secret"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Client Secret from the Databricks OAuth application (entered as a masked field)."]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":4},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Setup Guide"]}," panel on this form as your reference — it contains the exact ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Redirect URL"]}," to register in Databricks (Step 1)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save"]},". The Databricks connector now appears in your configured list."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Make sure the connector is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["enabled"]}," so users can authorize connections to it."]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-connector-select-databricks.b62335003dd088c06f4c223f9b15fe7757ee466a657bf196b3baa0e461bc91b3.fdfbfafb.webp","alt":"The Select Connector screen with the Databricks connector and an Add button","framed":false,"withLightbox":true,"width":"800px"},"children":[]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-connector-configure-databricks.014ec76e551846b6c5ea9d8d3ac3e30bddc57b210dc8e292aa66e8d51b89ae7e.fdfbfafb.webp","alt":"The Configure Databricks form showing Workspace URL, Client ID, and Client Secret fields with the Setup Guide panel below","framed":false,"withLightbox":true,"width":"800px"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Allow the workspace domain in your network policy"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your account uses a network policy, allow the connector's ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["egress domain"]}," (your Databricks workspace host) so the agent's sandbox can reach it. The required domain is shown next to the configured connector in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connector Settings"]},"."]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-connector-databricks-configured.1cc985a0fb53a2d0e2d5d9a3c23313b52777f03af6cacb74c4cfd6ad2005eaaa.fdfbfafb.webp","alt":"The configured Databricks connector enabled, with a hint to allow its workspace domain in your network policy","framed":false,"withLightbox":true,"width":"800px"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-3--authorize-your-connection-user","__idx":5},"children":["Step 3 — Authorize Your Connection (User)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each user who wants the agent to access Databricks authorizes their own connection:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings → Connections"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Under ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Available"]},", find ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Databricks"]}," and click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connect"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sign in to Databricks in the popup and approve the requested access."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["When the popup closes, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Databricks"]}," appears in your connected list with the date you connected it."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To remove the connection later, click the delete (trash) icon next to it."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Connect from a chat instead"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You don't have to authorize in advance. If you ask the agent to work with Databricks before you've connected, it shows a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connection Required"]}," card in the chat — click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connect"]}," there to run the same authorization without leaving the conversation. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/connections#connect-from-a-chat"},"children":["Connect from a chat"]},"."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-4--use-databricks-in-a-chat","__idx":6},"children":["Step 4 — Use Databricks in a Chat"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once connected, ask the agent to work with your Databricks data — for example, to explore a table or visualize a result. The agent uses your connection automatically; no extra configuration is needed in the chat."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"reference","__idx":7},"children":["Reference"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Item"},"children":["Item"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Connector"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Databricks"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authentication"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["OAuth 2.0 (user-to-machine)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["OAuth scopes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["all-apis"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["offline_access"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required configuration"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Workspace URL, Client ID, Client Secret"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Redirect URL"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shown in the connector form's ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Setup Guide"]}," (ends in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/connections/callback"]},")"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"troubleshooting","__idx":8},"children":["Troubleshooting"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Issue"},"children":["Issue"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Solution"},"children":["Solution"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Databricks isn't listed on the Connections tab"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["An administrator must add the Databricks connector in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Connector Settings"]}," and enable it."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["OAuth popup shows a redirect URL error"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Redirect URLs"]}," in the Databricks OAuth application must exactly match the callback URL shown in the connector form's Setup Guide."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The connection authorizes but the agent can't reach Databricks"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Allow your Databricks workspace domain in your network policy (see the egress domain shown in Connector Settings)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"Workspace URL\" is rejected"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The URL must be your workspace host in the form ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://<workspace>.cloud.databricks.com"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Saving the connector fails on the client secret"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Generate a new client secret in Databricks and re-enter it — secrets can't be retrieved after the application is created."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":9},"children":["Next Steps"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/connections"},"children":["Connections"]}," — The general connection model and administrator controls"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/query/query-results"},"children":["Reading Query Results"]}," — How the agent's output reaches you, and how to export it"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/concepts/reliable-answers"},"children":["Getting Reliable Answers"]}," — Why answers vary, and where to define your conventions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/ai-studio/query/query-results#charting-a-result"},"children":["Charting a Result"]}," — Turning a query result into a chart"]}]}]},"headings":[{"value":"Connect Databricks","id":"connect-databricks","depth":1},{"value":"Objective","id":"objective","depth":2},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Step 1 — Create an OAuth Application in Databricks (Administrator)","id":"step-1--create-an-oauth-application-in-databricks-administrator","depth":2},{"value":"Step 2 — Configure the Connector in Treasure AI (Administrator)","id":"step-2--configure-the-connector-in-treasure-ai-administrator","depth":2},{"value":"Step 3 — Authorize Your Connection (User)","id":"step-3--authorize-your-connection-user","depth":2},{"value":"Step 4 — Use Databricks in a Chat","id":"step-4--use-databricks-in-a-chat","depth":2},{"value":"Reference","id":"reference","depth":2},{"value":"Troubleshooting","id":"troubleshooting","depth":2},{"value":"Next Steps","id":"next-steps","depth":2}],"frontmatter":{"seo":{"title":"Treasure AI Studio - Connect Databricks","description":"Connect Treasure AI Studio to Databricks so agents can explore and visualize your lakehouse data. Set up the Databricks OAuth application, configure the connector, and authorize your connection."},"platforms":["Web","Desktop"]},"lastModified":"2026-09-08T06:33:54.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/ai-studio/connections/databricks","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}