Agent context
YouTube Analytics models
4 SQL models that turn the raw YouTube Analytics tables into the reports people ask about. Deploy them in Weld and your agent queries the definitions behind every number.
How the set is built
- 4Raw tables
- 4Staging
- 5Core
- 4Analytics
Staging cleans each raw table once, core holds the logic, and analytics is the table dashboards and agents read.
- Channel performance dailyChannel totals per day: views, watch time, engagement, subscriber movement and thumbnail reach. The YouTube Studio channel overview, by day.grain: date_day x channel_id · 2 raw tables
- Traffic sources dailyWhere views come from: YouTube search, suggested videos, browse, Shorts feed, external sites and so on. The YouTube Studio "Traffic source types" report.grain: date_day x channel_id x traffic_source_type · 1 raw table
- Video performance dailyPer-video views, watch time, engagement, subscribers and thumbnail reach, the YouTube Studio "Content" tab by day.grain: date_day x channel_id x video_id · 2 raw tables
- Viewer demographics dailyWho watches each channel: views split by age group and gender per day, the "Age" and "Gender" cards of the YouTube Studio Audience tab.grain: date_day x channel_id x age_group x gender · 2 raw tables
- Weld or dbt
- The same SQL in both dialects. Sync the folder with GitHub Sync, or copy the dbt models into your project.
- Check before you rely on it
- Reconcile a month against YouTube Analytics's own reports first. Each model's notes say what the synced data can and can't support.
Connect YouTube Analytics.
Your agents start with context.
Sync YouTube Analytics to your warehouse, deploy these models, and query them from Claude, Cursor or ChatGPT over MCP. Free for 14 days, no credit card.