Meta’s Ads Manager is built for campaign managers. It’s good enough for day-to-day optimization. It is not enough for the analysis that actually moves the needle.
Which campaigns drove customers with the highest 90-day retention? Which audiences convert at the best LTV-to-CAC ratio? How does Facebook ROAS compare to Google Ads when you apply a consistent attribution model? Those questions require your Facebook Ads data to live in the same warehouse as your CRM, product, and revenue data, where SQL can reach all of it at once.
This guide walks through setting up a Facebook Ads to Snowflake pipeline with Meltano’s open-source tap-facebook connector, from installation to production scheduling. We also cover how to build a custom Facebook connector with Claude when you need something tap-facebook doesn’t cover out of the box.
TL;DR Meltano’s tap-facebook connector extracts data from the Facebook Marketing API and loads it into Snowflake, BigQuery, or Postgres in under 30 minutes of setup. MVF uses Meltano to move 600M+ rows of paid media data annually at 86% lower cost than Fivetran (Meltano case study, 2026). Workload-based pricing means volume doesn’t inflate your ETL bill.
Why Building a Facebook Ads Pipeline Is Harder Than It Looks
Teams that attempt to build Facebook Ads ETL scripts from scratch regularly underestimate three problems that turn a weekend project into an ongoing maintenance burden.
The Facebook Marketing API Rate Limits
The Facebook Marketing API enforces rate limits using a Usage Header system that tracks consumption against a per-app, per-account quota. When requests exceed the threshold, the API blocks further calls until the quota refreshes. A custom script needs back-off logic, retry handling, and careful scheduling for any parallel processes sharing the same credentials. When this isn’t implemented correctly, the pipeline doesn’t always raise an error. It drops data quietly.
Quarterly API Versioning and Schema Drift
Meta runs a quarterly API versioning cycle with a two-year support window per version. In 2025, Meta removed reach and breakdown dimension queries for historical data older than 13 months, deprecated the 7-day and 28-day view attribution windows, and changed field types across the Ads Insights API (Meta for Developers, 2025). Custom scripts break when these changes roll out. Open-source taps maintained by the community, like tap-facebook in MeltanoLabs, absorb these changes so you don’t have to.
Per-Row Billing at Marketing Data Scale
Facebook Ads generates a high volume of impression, click, and conversion data. At the scale marketing teams operate, per-row ETL billing becomes a significant cost. MVF, a global customer generation platform, was running 600 million rows of paid media data annually. Under Fivetran, their ETL spend had nearly tripled. After switching to Meltano’s workload-based model, costs dropped 86%.
Their Head of Data, Andonis Pavlidis, described the situation plainly: “Prices were always increasing, SLAs were dropping. It didn’t feel like a partnership anymore, but rather like a commodity.”
MVF case study
MVF migrated 1B+ rows across 60+ sources from Fivetran to Meltano, reducing ETL costs by 86% while maintaining zero downtime during the switch (Meltano case study, 2026). The core driver was switching from per-row billing to workload-based pricing, where cost is tied to pipeline execution rather than data volume.
Setting Up tap-facebook with Meltano: Step by Step
Prerequisites
Before starting, you need:
- Python 3.8 or later with Meltano installed
- A Facebook App with Marketing API permissions enabled
- A long-lived access token (generate via the Facebook Graph API Explorer)
- Your Facebook Ads account ID
- Snowflake, BigQuery, Postgres, or Redshift credentials
Step 1: Create Your Meltano Project
pip install meltano
meltano init facebook-pipeline
cd facebook-pipeline
Step 2: Add the Facebook Ads Extractor
meltano add extractor tap-facebook
This pulls the MeltanoLabs-maintained tap-facebook from Meltano Hub and registers it in your meltano.yml.
Step 3: Configure Your Credentials
meltano config tap-facebook set access_token YOUR_LONG_LIVED_TOKEN
meltano config tap-facebook set account_id YOUR_ACCOUNT_ID
meltano config tap-facebook set start_date 2024-01-01T00:00:00Z
The start_date controls how far back the initial historical sync goes. Twelve to 24 months is a reasonable starting point for most marketing teams.
Step 4: Add Your Loader
meltano add loader target-snowflake
meltano config target-snowflake set account YOUR_SNOWFLAKE_ACCOUNT
meltano config target-snowflake set username YOUR_USERNAME
meltano config target-snowflake set password YOUR_PASSWORD
meltano config target-snowflake set database YOUR_DATABASE
meltano config target-snowflake set warehouse YOUR_WAREHOUSE
meltano config target-snowflake set schema facebook_ads
For Snowflake:
For BigQuery, swap target-snowflake for target-bigquery and configure with your project ID and service account credentials path.
Step 5: Run Your First Sync
meltano run tap-facebook target-snowflake
The first run performs a full historical load from your start_date. Every subsequent run is incremental, picking up only new and updated records since the last extraction.
How to Schedule and Monitor Your Facebook Ads Pipeline
Daily syncs cover most marketing analytics requirements. For teams reviewing intraday campaign performance, hourly is achievable.
meltano schedule add facebook-daily \
--extractor tap-facebook \
--loader target-snowflake \
--interval "@daily"
Meltano Cloud runs your schedule on managed infrastructure with built-in monitoring. If you’re self-hosting, Meltano has native integrations with Airflow and Dagster for orchestration.
One practice worth building in from day one: run your pipeline in a staging environment before promoting to production. MVF used Meltano’s dedicated development workspace to run new pipelines in parallel with their existing Fivetran setup before cutting over. They validated outputs for two weeks, confirmed data consistency, then switched. Zero downtime. Zero data loss.
What we’ve seen go wrong
Skipping staging and going straight to production means the first real sign of a configuration problem is a broken dashboard on a Monday morning. The two-week parallel validation adds a small upfront cost and prevents a much larger recovery cost.
How to Build a Custom Facebook Connector with Claude
tap-facebook covers the core Facebook Marketing API streams: campaigns, ad sets, ads, ad insights, and creative data. What if you need an API endpoint the tap doesn’t support? Or a proprietary advertising platform with no existing Singer tap at all?
Singer taps follow a consistent Python structure: a tap entrypoint, stream definitions, authentication handling, and a catalog for stream discovery. The pattern is predictable enough that Claude can generate working boilerplate from a clear API description.
A prompt structure that works well:
I need to build a Singer tap in Python for [API NAME].
API documentation: [paste the relevant endpoint docs]
Authentication: [OAuth2 / API key / Bearer token]
Pagination: [cursor / offset / next page token]
Streams to extract: [list the streams you need]
Please generate a Singer tap following the Meltano tap-template
structure, including stream classes, auth handling, pagination,
and a basic test suite.
Claude generates the tap skeleton in minutes. You test and adjust. The scaffolding that would take two to three hours to write from scratch is done in under 30 minutes.
MVF used this approach to build a production-grade Baidu Ads connector — a source with no existing open-source Singer tap. It now runs in production, syncing Baidu campaign data into their warehouse alongside 60 other sources.
Once your custom tap is built, you add it to Meltano as a custom plugin:
meltano add --custom extractor tap-your-connector
On custom connectors
Any Singer-compatible tap works with Meltano, meaning analytics engineers can build custom connectors for proprietary APIs and have them running in production without waiting for an official platform update. MVF built a Baidu Ads connector using this approach as part of their 60-source Meltano migration (Meltano case study, 2026).
Frequently Asked Questions
What streams does tap-facebook extract?
tap-facebook extracts campaigns, ad sets, ads, ad insights (performance metrics by date, campaign, ad set, and ad), and ad creative data. Insights support breakdowns by age, gender, device, placement, and region. For custom breakdowns or unsupported endpoints, you can build a custom Singer tap with Claude as described above.
How does tap-facebook handle Facebook API version updates?
The MeltanoLabs-maintained tap-facebook receives community updates when Meta releases breaking API changes. You pin the tap version in meltano.yml, which means updates don’t deploy automatically. You test in staging, confirm the outputs are consistent with the previous version, then promote to production.
What does Meltano cost compared to Fivetran for Facebook Ads data?
Meltano Cloud charges per workload rather than per row. For Facebook Ads data at scale, the difference is significant. MVF reduced ETL costs by 86% after switching from Fivetran, while processing 600M rows of paid media data annually.
Can I load Facebook Ads data into Snowflake and BigQuery simultaneously?
Yes. You can run meltano run tap-facebook target-snowflake target-bigquery to load into both warehouses in a single pipeline execution. Meltano supports multiple loader targets from a single extractor.
Conclusion
A Facebook Ads to Snowflake pipeline gives your analytics team data that Meta’s dashboard can’t provide. The setup takes under 30 minutes. The scheduling and monitoring is built in. When you need a connector for an unsupported source, Claude generates the Singer boilerplate so you’re not starting from scratch.
Key takeaways:
- tap-facebook handles Facebook Marketing API extraction, rate limiting, and schema updates without custom maintenance work
- Configure once, schedule daily, and your data is in Snowflake before your team starts their morning
- For custom connectors, describe the API to Claude and get working tap scaffolding in under an hour
- Workload-based pricing means your ETL cost doesn’t grow with your ad spend
If your current ETL vendor charges per row for marketing data at scale, book an ETL Escape Planning Audit to walk through what the cost difference actually looks like at your volume.