Collect YouTube audience by country in Databricks
Load daily views, watch time and subscribers by viewer country into your own Databricks workspace with a custom OWOX connector. Each market YouTube reports becomes a row per day, ready for the models your data team already runs.
DatabricksChann…DayViewsDaily 09:00In Databricks, each market's YouTube audience should sit next to its orders and ad spend, but YouTube shows only top countries for a period.
Paste this into your AI assistant. It sets up a YouTube Data Mart in OWOX Data Marts that loads geography daily and the channel into your Databricks workspace, refreshed on a schedule.
The prompt
Read https://www.owox.com/ai-agent-setup.md and follow it to set up OWOX Data Marts for me, starting from /connectors/youtube-connector-to-databricks.md. The task: load YouTube geography daily into Databricks with a daily refresh, and show me watch time by country by month, ready to join to our orders by country. Tag the links you give me with utm_campaign=ai-task and utm_term=data-foundation. Use what you know about my context and goals
YouTube Endpoints
11 YouTube endpoints you can import. Each lands in its own table in your data warehouse.
Channel
The channel itself, one row, refreshed on every run: title, description, country, creation date, the lifetime view, subscriber and video counts YouTube shows on the channel page, and the uploads playl
15 fieldsChannel daily
One row per day for the whole channel: views, watch time, average view duration and percentage, likes, dislikes, comments, shares, subscribers gained and lost, playlist adds.
14 fieldsTime seriesDemographics daily
Share of watch time per age group and gender, per day.
5 fieldsTime seriesDevices daily
Views and watch time per day, device type and operating system: desktop, mobile, tablet, TV, game console; Android, iOS, Windows, Macintosh, and so on.
6 fieldsTime seriesGeography daily
Views, watch time, average view duration and percentage, likes, comments, shares and subscriber changes per country and day.
13 fieldsTime seriesPlaylist items
Which video sits in which playlist, at which position: the many-to-many bridge between playlists and videos.
9 fieldsPlaylists
The channel's playlists (series, courses, product lines), with item counts and privacy.
8 fieldsRevenue daily
Estimated revenue, ad revenue, YouTube Premium revenue, gross revenue, CPM, playback-based CPM, ad impressions and monetized playbacks per day, for channels in the YouTube Partner Program.
10 fieldsTime seriesTraffic sources daily
Views and watch time per day and traffic source type: YouTube search, suggested videos, browse features (home, subscriptions), external (websites and apps, including your own site and newsletters), pl
5 fieldsTime seriesVideo daily
Per video and day: views, watch time, average view duration and percentage, likes, dislikes, comments, shares, subscribers gained and lost.
13 fieldsTime seriesVideos
Every public upload with its metadata and lifetime counters as of the run: title, description, tags, category, duration, publish time, privacy, and the view, like and comment counts the watch page sho
25 fields
Why bring YouTube audience by country into your analytics platform
YouTube knows which countries watch. Which of them buy, and where it is worth localizing or advertising, is in sales and ad data. Weighing markets needs the country series in the same warehouse as orders and spend.
- Rank markets by watch time, not only by views
- Set orders by country beside the channel's audience there
- Feed market forecasts from the same tables
Your data warehouseYouTubeOrdersModelsJoined by idVideo watchedOrder placedOne query sets audience beside sales per market.Step 1: Connect YouTube and pick the fields
Create a Data Mart, choose YouTube as the source and sign in with the Google account that manages the channel. Open an endpoint and tick only the fields you need.
- Geography daily carries views, watch time, retention and subscribers per country and day
- A custom connector: the Google credential and the channel ID are yours
Step 2: Load YouTube into Databricks
Each endpoint becomes its own table, and refresh settings are set in the Data Mart. Run it and the first load lands as a table in a schema of the main catalog in Databricks. The location is pre-filled from your storage, and you can change it.
- Geography daily lands in its own table in the Databricks catalog
- Every run is logged in Run History
DestinationCatalogmainSchemayoutubeTablegeography_dailyRun
Tablemain.youtube.geography_dailyStep 3: Get a business-friendly YouTube output schema
After the first run you get the output schema: every field with its type and a description. country is an ISO code, ZZ when YouTube does not know it.
- YouTube withholds rows for countries with too few viewers
- likes counts net likes, so a day can dip below zero
main.youtube.geography_dailyOutput schemaFieldDescriptiondayThe day, stamped from the…countryViewer country, ISO 3166-1…viewsViews on that day (YouTube's…estimated_minutes_watchedWatch time in minutes. The…average_view_percentageAverage share of the video…subscribers_gainedSubscribers gained from this…Step 4: Keep the YouTube tables linked
The channel, Geography daily and Demographics daily stay separate tables, joined on channel_id and day. Together they become the audience part of one YouTube model.
- Geography daily joins orders on country and day
- Read the age and gender mix beside the countries, day by day; YouTube does not split one by the other
Step 5: Schedule the YouTube refresh and backfill history
Set it once. A daily scheduled refresh adds new days, and a manual backfill loads earlier periods for modeling.
- Daily runs with no pipeline to maintain
- Backfill the periods you want to model
Step 6: Reuse the same YouTube table everywhere
One table feeds your model, , , assistants and scheduled insights in Slack or email.
- Define a market's watch time once
- Every report reads the same table
- 0.45.0Know what a backfill loads when a connector has no date fields
- 0.44.0Connector Data Marts set up through MCP no longer fail their first run because of the table path
- 0.44.0Backfill a catalog for any period in one run, and follow a long backfill as parts of one operation
- 0.41.0Rotating a warehouse key is one change: Storages share reusable Credentials
- 0.41.0Shared SQL logic stays in one place: build a Data Mart on top of another
Why OWOX for YouTube in Databricks
Studio shows the top countries for a period you pick. OWOX loads every country YouTube reports, every day, into your own Databricks workspace beside everything else you model.
- You own the data. It lands in your own data warehouse, in tables you control.
- Each market, each day. One row per reported country and day, so a market that starts growing shows early.
- Notebook-ready. Tables in Databricks are ready for the models your data team already runs.
- One place to fix. When the YouTube Analytics API changes, you publish a new connector version that keeps the field names.
The Data Partner You Can Trust
users
166K Source: Internal OWOX data as of 2026-11-15
Executives and data analysts across 20+ industries
Customers
You are booked. The invitation is on its way to , with the calendar invite and the meeting link.