Skip to main content

Set up Meta Ads as a data source

Beta

The Meta Ads connector is in Beta. Workspace admins can control access to this feature from the Previews page. See Manage Databricks previews.

This article describes how to set up Meta Ads as a data source for ingestion using Databricks Lakeflow Connect.

Before you begin

To set up Meta Ads as a data source, you need:

  • A Meta Business Manager account with access to ad accounts
  • A Meta Developer account
  • Admin access to create and configure a Meta app
  • Permissions to manage OAuth settings in Meta

Create a Meta developer account

For instructions, see Register as a Meta developer in the Meta documentation.

Create a Meta developer app

  1. Navigate to the Meta for Developers App Dashboard and click Create App.

  2. For the use case, select Other, then choose the Business app type. This creates the app using the classic experience, which is required for this configuration.

  3. In the App Dashboard, use the toggle at the top of the screen to switch the app from In Development to Live mode. You must provide a Privacy Policy URL in App Settings > Basic.

  4. From the sidebar of the App Dashboard, click Add product and select Facebook Login for Business.

  5. Navigate to the Settings page of the app you just created.

  6. In the Valid OAuth Redirect URIs field, enter the URI for your Databricks workspace. The format is:

    https://<your-workspace-url>/login/oauth/lakehousefederation.html

  7. In the App Dashboard sidebar, navigate to App Settings > Basic and save the app ID and app secret.

Configure OAuth settings

Configure OAuth redirect URIs to allow Databricks to authenticate with your Meta app.

  1. In the Meta app dashboard, go to App Settings > Basic.

  2. Scroll to the Add Platform section and click Website.

  3. In the Site URL field, enter the OAuth redirect URI for your Databricks workspace:

    https://<workspace-url>/oauth/callback
  4. Click Save Changes.

Next steps

Create a connection