{"componentChunkName":"component---src-templates-markdown-template-jsx","path":"/guides/data-warehouse/composable-audiences/connections/databricks/","result":{"data":{"pageMetadata":{"title":"Databricks","path":"/guides/data-warehouse/composable-audiences/connections/databricks/","sourceCode":null,"metadataParent":{"title":"Connections","path":"/guides/data-warehouse/composable-audiences/connections/","sourceCode":null,"hasVersionPicker":null,"metadataChildren":[{"title":"Connections Overview","path":"/guides/data-warehouse/composable-audiences/connections/overview/","order":1,"label":null},{"title":"Google BigQuery","path":"/guides/data-warehouse/composable-audiences/connections/bigquery/","order":2,"label":null},{"title":"Databricks","path":"/guides/data-warehouse/composable-audiences/connections/databricks/","order":3,"label":null},{"title":"Amazon Redshift","path":"/guides/data-warehouse/composable-audiences/connections/redshift/","order":4,"label":null},{"title":"Snowflake","path":"/guides/data-warehouse/composable-audiences/connections/snowflake/","order":5,"label":null}],"metadataParent":{"title":"Composable Audiences","path":"/guides/data-warehouse/composable-audiences/","metadataChildren":[{"title":"Warehouse Setup Overview","path":"/guides/data-warehouse/composable-audiences/overview/","order":0.5,"label":null},{"title":"Connections","path":"/guides/data-warehouse/composable-audiences/connections/","order":1,"label":null},{"title":"Data Models","path":"/guides/data-warehouse/composable-audiences/data-models/","order":2,"label":null}],"metadataParent":{"title":"Data Warehouse","path":"/guides/data-warehouse/","metadataChildren":[{"title":"Composable Audiences","path":"/guides/data-warehouse/composable-audiences/","order":1,"label":null},{"title":"Warehouse Sync","path":"/guides/data-warehouse/warehouse-sync/","order":4,"label":null}],"metadataParent":{"title":"Guides","path":"/guides/","metadataChildren":[{"title":"Platform Overview","path":"/guides/platform-overview/","order":0.5,"label":null},{"title":"Getting Started","path":"/guides/getting-started/","order":1,"label":null},{"title":"mParticle Agent","path":"/guides/mparticle-agent/","order":1.5,"label":null},{"title":"Oversight","path":"/guides/oversight/","order":2,"label":null},{"title":"Data Platform","path":"/guides/data-platform/","order":3,"label":null},{"title":"Data Warehouse","path":"/guides/data-warehouse/","order":4,"label":null},{"title":"Customer 360","path":"/guides/customer-360/","order":5,"label":null},{"title":"Analytics","path":"/guides/analytics/","order":6,"label":null},{"title":"Audiences","path":"/guides/audiences/","order":7,"label":null},{"title":"Settings","path":"/guides/settings/","order":8,"label":null},{"title":"Troubleshooting mParticle","path":"/guides/troubleshooting/","order":10,"label":null},{"title":"Default Service Limits","path":"/guides/default-service-limits/","order":11,"label":null},{"title":"Glossary","path":"/guides/glossary/","order":12,"label":null}],"metadataParent":null}}}}},"markdownRemark":{"html":"<p>This guide explains how to connect your Databricks workspace to mParticle for Composable Audiences. The setup process is interactive: as you enter values in the mParticle UI form, the SQL snippets on the right-hand side will update. You’ll copy those snippets and run them in Databricks to configure the necessary resources.</p>\n<p><strong>What you’ll need:</strong></p>\n<ul>\n<li>Administrative access to your Databricks account (only Account Admins can perform these steps).</li>\n</ul>\n<p><strong>What you’ll accomplish:</strong>\nA configured connection that allows mParticle to securely query your Databricks data for building and managing Composable Audiences.</p>\n<h2 id=\"step-1-begin-creating-the-connection-in-mparticle\" style=\"position:relative;\"><a href=\"#step-1-begin-creating-the-connection-in-mparticle\" aria-label=\"step 1 begin creating the connection in mparticle permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Step 1: Begin creating the connection in mParticle</h2>\n<ol>\n<li>In the mParticle UI, go to <strong>Data Warehouse > Connections</strong>.</li>\n<li>Click <strong>+ Add Connection</strong> and select <strong>Databricks</strong>.</li>\n<li>\n<p>Start filling out the required fields on the connection form:</p>\n<ul>\n<li><strong>Connection Name</strong>: A descriptive name for the connection.</li>\n<li><strong>Server Host Name</strong>: The hostname of your Databricks workspace (for example, <code class=\"language-text\">adb-123456789012345.7.azuredatabricks.net</code>).</li>\n<li><strong>SQL Warehouse HTTP Path</strong>: The HTTP path for the SQL Warehouse you’ll use.</li>\n<li><strong>Catalog Name</strong>: The Databricks catalog containing your data.</li>\n<li><strong>Schema Name</strong>: The schema inside the catalog where your tables live.</li>\n<li><strong>Service Principal Client ID</strong> and <strong>Client Secret</strong>: The credentials for the Databricks service principal.</li>\n<li><strong>Storage Credential Name</strong>: The name of the storage credential created with the provided AWS IAM role.</li>\n<li><strong>External Location</strong>: The name of the external location in the Databricks Unity Catalog. This external location maps to an S3 bucket path and uses the storage credential to control access. mParticle uses this location to read and write audience snapshot data.</li>\n</ul>\n</li>\n</ol>\n<p>As you enter these values, the <strong>SQL snippets on the right-hand side of the UI</strong> will update with the correct details for your environment.</p>\n<h2 id=\"step-2-apply-the-generated-sql-snippets-in-databricks\" style=\"position:relative;\"><a href=\"#step-2-apply-the-generated-sql-snippets-in-databricks\" aria-label=\"step 2 apply the generated sql snippets in databricks permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Step 2: Apply the generated SQL snippets in Databricks</h2>\n<p>Follow the numbered instructions displayed in the mParticle UI. For each step:</p>\n<ol>\n<li><strong>Configure the Storage Credential</strong>\nIn your Databricks Catalog Explorer, create a new storage credential using the AWS IAM role provided in the mParticle UI for your specific mParticle org. You will find the AWS IAM role under “1. Configure the Storage Credential for S3 Access” in the <strong>Setting up Databricks</strong> instructions in the mParticle UI.</li>\n<li><strong>Configure the External Location</strong>\nIn your Databricks Catalog Explorer, create a new external location using the storage credential you created in Step 1 and the S3 bucket URL provided in the mParticle UI. Click <strong>Force Create</strong> when prompted. You will find the S3 bucket URL under “2. Configure the External Location based on the new Storage Credential for S3 Access” in the <strong>Setting up Databricks</strong> instructions in the mParticle UI.</li>\n<li><strong>Configure a Service Principal and Secret</strong>\nIf not already created, set up a service principal in Databricks and generate a secret. Enter the Client ID and Secret under <strong>Service Principle Client ID</strong> and <strong>Service Principle Client Secret</strong> in the mParticle UI.</li>\n<li><strong>Grant permissions to the Service Principal</strong>\nRun the SQL provided in the mParticle UI to grant your service principal the necessary access to the external location.</li>\n</ol>\n<div class=\"gatsby-highlight\" data-language=\"sql\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-sql line-numbers\"><code class=\"language-sql\"><span class=\"token keyword\">GRANT</span> <span class=\"token keyword\">READ</span> FILES<span class=\"token punctuation\">,</span> <span class=\"token keyword\">WRITE</span> FILES <span class=\"token keyword\">ON</span> EXTERNAL LOCATION <span class=\"token punctuation\">`</span><span class=\"token punctuation\">[</span>your_external_location_name<span class=\"token punctuation\">]</span><span class=\"token punctuation\">`</span> <span class=\"token keyword\">to</span> <span class=\"token punctuation\">`</span><span class=\"token punctuation\">[</span>your_service_principal_client_id<span class=\"token punctuation\">]</span><span class=\"token punctuation\">`</span><span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<ol start=\"5\">\n<li><strong>Configure a SQL Warehouse</strong>\nIn the Databricks UI, create a SQL Warehouse with an appropriate size. Grant the service principal <strong>Can Use</strong> access. Enter its HTTP Path in the mParticle UI under <strong>SQL Warehouse HTTP Path</strong> in the mParticle UI.</li>\n<li><strong>Grant access to Catalog and Schema</strong>\nRun the SQL provided in the mParticle UI to grant the service principal permission to use the catalog and schema.</li>\n</ol>\n<div class=\"gatsby-highlight\" data-language=\"sql\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-sql line-numbers\"><code class=\"language-sql\"><span class=\"token keyword\">GRANT</span> <span class=\"token keyword\">USE</span> CATALOG <span class=\"token keyword\">ON</span> CATALOG <span class=\"token punctuation\">`</span><span class=\"token punctuation\">[</span>your_catalog_name<span class=\"token punctuation\">]</span><span class=\"token punctuation\">`</span> <span class=\"token keyword\">TO</span> <span class=\"token punctuation\">`</span><span class=\"token punctuation\">[</span>your_service_principal_client_id<span class=\"token punctuation\">]</span><span class=\"token punctuation\">`</span><span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<div class=\"gatsby-highlight\" data-language=\"sql\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-sql line-numbers\"><code class=\"language-sql\"><span class=\"token keyword\">GRANT</span> <span class=\"token keyword\">USE</span> <span class=\"token keyword\">SCHEMA</span> <span class=\"token keyword\">ON</span> <span class=\"token keyword\">SCHEMA</span> <span class=\"token punctuation\">`</span><span class=\"token punctuation\">[</span>your_catalog_name<span class=\"token punctuation\">]</span><span class=\"token punctuation\">`</span><span class=\"token punctuation\">.</span><span class=\"token punctuation\">`</span><span class=\"token punctuation\">[</span>your_schema_name<span class=\"token punctuation\">]</span><span class=\"token punctuation\">`</span> <span class=\"token keyword\">TO</span> <span class=\"token punctuation\">`</span><span class=\"token punctuation\">[</span>your_service_principal_client_id<span class=\"token punctuation\">]</span><span class=\"token punctuation\">`</span><span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<ol start=\"7\">\n<li><strong>Grant read access to tables</strong>\nRun the SQL provided in the mParticle UI to grant the service principal <code class=\"language-text\">SELECT</code> access to the tables you want to use for Composable Audiences.</li>\n</ol>\n<div class=\"gatsby-highlight\" data-language=\"sql\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-sql line-numbers\"><code class=\"language-sql\"><span class=\"token keyword\">GRANT</span> <span class=\"token keyword\">SELECT</span> <span class=\"token keyword\">ON</span> <span class=\"token keyword\">TABLE</span> <span class=\"token punctuation\">`</span><span class=\"token punctuation\">[</span>your_catalog_name<span class=\"token punctuation\">]</span><span class=\"token punctuation\">`</span><span class=\"token punctuation\">.</span><span class=\"token punctuation\">`</span><span class=\"token punctuation\">[</span>your_schema_name<span class=\"token punctuation\">]</span><span class=\"token punctuation\">`</span><span class=\"token punctuation\">.</span><span class=\"token punctuation\">[</span>your <span class=\"token keyword\">table</span><span class=\"token punctuation\">]</span> <span class=\"token keyword\">TO</span> <span class=\"token punctuation\">`</span><span class=\"token punctuation\">[</span>your_service_principal_client_id<span class=\"token punctuation\">]</span><span class=\"token punctuation\">`</span><span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<ol start=\"8\">\n<li><strong>Set up the MPARTICLE schema</strong>\nFinally, run the SQL provided in the mParticle UI to create a schema named <code class=\"language-text\">MPARTICLE</code>. This schema stores temporary data and intermediate results. Grant your service principal full DML privileges here.</li>\n</ol>\n<div class=\"gatsby-highlight\" data-language=\"sql\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-sql line-numbers\"><code class=\"language-sql\"><span class=\"token keyword\">CREATE</span> <span class=\"token keyword\">SCHEMA</span> <span class=\"token keyword\">IF</span> <span class=\"token operator\">NOT</span> <span class=\"token keyword\">EXISTS</span> MPARTICLE<span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">GRANT</span> <span class=\"token keyword\">USE</span> <span class=\"token keyword\">SCHEMA</span> <span class=\"token keyword\">ON</span> <span class=\"token keyword\">SCHEMA</span> MPARTICLE <span class=\"token keyword\">TO</span> <span class=\"token punctuation\">`</span><span class=\"token punctuation\">[</span>your_service_principal_client_id<span class=\"token punctuation\">]</span><span class=\"token punctuation\">`</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">GRANT</span> <span class=\"token keyword\">CREATE</span> <span class=\"token keyword\">TABLE</span><span class=\"token punctuation\">,</span> <span class=\"token keyword\">SELECT</span><span class=\"token punctuation\">,</span> <span class=\"token keyword\">MODIFY</span> <span class=\"token keyword\">ON</span> <span class=\"token keyword\">SCHEMA</span> MPARTICLE <span class=\"token keyword\">TO</span> <span class=\"token punctuation\">`</span><span class=\"token punctuation\">[</span>your_service_principal_client_id<span class=\"token punctuation\">]</span><span class=\"token punctuation\">`</span><span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span></span></pre></div>\n<h2 id=\"step-3-complete-the-connection-in-mparticle\" style=\"position:relative;\"><a href=\"#step-3-complete-the-connection-in-mparticle\" aria-label=\"step 3 complete the connection in mparticle permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Step 3: Complete the connection in mParticle</h2>\n<ol>\n<li>Once you’ve run all SQL snippets in Databricks, return to the mParticle UI.</li>\n<li>Review the values you entered in the connection form.</li>\n<li>Click <strong>Create Connection</strong>.</li>\n</ol>\n<aside class=\"note\">\nThe setup process alternates between filling out the mParticle form and running the generated SQL snippets in Databricks. Always use the snippets provided in the mParticle UI, as they include your environment-specific values.\n</aside>","frontmatter":{"title":"Databricks","order":3,"seoTitle":null,"seoDescription":null},"parent":{"__typename":"File","modifiedTime":"October 12, 2026"}}},"pageContext":{"slug":"/guides/data-warehouse/composable-audiences/connections/databricks/"}},"staticQueryHashes":["2950460867"]}