Skip to main content

Meta Ads connector concepts

Beta

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

The Meta Ads connector allows you to ingest advertising data from Meta Ads using Databricks Lakeflow Connect.

How does Meta Ads ingestion work?

The connector retrieves data from the Insights API and writes it to streaming tables. Each Meta Ads object corresponds to a table in your destination schema.

Connector data model

The Meta Ads connector can ingest the following objects from your Meta Ads account:

  • ads: Individual ads in your campaigns
  • ad_sets: Ad sets that group ads together
  • campaigns: Top-level campaign objects
  • ad_images: Images used in ads
  • ad_insights: Performance metrics and analytics data
  • ad_creatives: Creative elements used in ads
  • custom_audiences: Custom audience definitions
  • ad_videos: Video assets used in ads
  • custom_conversions: Custom conversion event definitions

ad_insights object

The ad_insights object provides performance metrics for your advertising campaigns. You can configure breakdowns and action breakdowns to analyze performance at different levels:

  • Granularity levels: account, campaign, ad_set, or ad
  • Breakdown dimensions: Age, gender, country, placement, device platform, and more
  • Action breakdowns: Action type, action destination, and other conversion-related dimensions
  • Time increment: Daily (hourly time increments aren't supported in Beta)

Connector basics

  • On the initial run of the pipeline, the connector ingests all of the data from the selected objects.
  • On subsequent pipeline runs, the connector ingests newly created or modified records using incremental ingestion.
  • The connector automatically transforms Meta Ads data types to Delta-compatible data types.
  • Each destination table is a streaming table, which is a Delta table with extra support for incremental data processing.

Incremental ingestion

The Meta Ads connector uses incremental ingestion to improve pipeline efficiency. On the first run of your pipeline, it ingests all of the selected data from the source. On subsequent runs, the connector uses cursor-based change tracking to ingest only the data that changed since the prior run.

The connector uses the updated_time field (when available) as the cursor column to detect changes. For objects without an updated_time field, the connector uses full refresh ingestion.

Attribution settings

The Meta Ads connector uses the following fixed attribution windows in Beta:

  • Click attribution window: 7 days
  • View attribution window: 1 day

Custom attribution windows aren't supported in Beta.

Supported advertising platforms

In Beta, the connector supports only Facebook Ads. Instagram Ads aren't supported.

Authentication

The connector uses OAuth 2.0 to authenticate with Meta Ads. You create a Meta app in the Meta Developer Portal and configure OAuth settings to allow Databricks to access your advertising data. The connection credentials are stored securely in Unity Catalog.

Next steps