TL;DR
- Metabase connects to BigQuery with a service account key file. An editor or admin downloads one from Dashboards & Apps in your SourceMedium workspace. No Google Cloud setup is needed.
- In Metabase, add a BigQuery database with that file and your two dataset names. Leave both project ID fields blank.
- Install the foundation dashboards from the Metabase template with a coding agent or one command. Their numbers use SourceMedium’s published metric definitions.
- No agent or command line? Build the three starter questions by hand.
The template supports Metabase 0.64 and 0.65, tested with v0.64.1 (which includes security fixes) and v0.65.3. Its installer checks the version before it changes anything.
1. Run Metabase
Any edition and any host works.- Fastest: start a Metabase Cloud trial.
- Free: run the open-source edition yourself, for example with Docker.
2. Download a key file
- In your SourceMedium workspace, an editor or admin opens Dashboards & Apps, opens Run it yourself, and on Your own Metabase chooses Install the template.
- In its Create a key step, use
Metabaseor a name you will recognize, then press Create key and confirm. - When the one-time panel appears, click Download key file. The two dataset names you need below are listed beside it.
- Confirm the file has saved, then check I saved the key file somewhere safe before clicking Done. Closing the panel loses access to this key.
3. Add the database in Metabase
In Metabase, go to Admin → Databases → Add a database and enter these values.
For the template’s installer and reusable metrics, also add your
SM_METADATA_DATASET_ID to the dataset list, separated by a comma, so the metric catalog and dim_data_dictionary are visible. This is optional for the three manual starter questions alone.
To explore models from other delivered datasets, add their exact dataset_name values from dim_data_dictionary to this list too. Preserve any existing entries and use only datasets your key can read. The template’s installer creates models from this dictionary inventory and reports documented tables that are unavailable in the connection. Metric support does not limit which models it creates.

BigQuery connection fields in Metabase v0.64.1. Both project IDs are blank; copy your own dataset name from Dashboards & Apps.

Scan filter values when adding a widget instead of on a daily schedule.
4. Install the foundation dashboards
The Metabase template installs the foundation: Overview with period comparisons, Business review, Performance tables, All stores, Paid marketing, Creatives, Products, Retention, Geography, Orders and Data. It also installs models, catalog metrics and shared SQL snippets. It runs on your computer with a Metabase API key and changes nothing until you approve its plan.- With a coding agent: in Dashboards & Apps, under Run it yourself, choose Install the template on Your own Metabase, or Manage on your Metabase key. Then copy a prompt into Codex or Claude Code. It clones your copy of the template and follows its instructions.
- With one command: follow Install by hand in the template’s README.
Without an agent or command line
Build the executive summary starter by hand from three SQL questions onrpt_executive_summary_daily.
What the numbers mean
The starter uses SourceMedium’s executive summary formulas over the selected channels, stores and dates. In the one you build by hand, Channel defaults to Online DTC (online_dtc), matching the Data Studio dashboards’ default channel filter. The template’s foundation dashboards start Channel on every sales channel, as the Next.js App starter does. Compare tools with the same store, absolute date range, time zone and channel selection.
Order measures count SourceMedium’s valid sales channels: online_dtc, amazon, retail, wholesale and tiktok_shop. With no Channel selected, they sum all five. Rows under any other channel value, such as excluded, draft_orders, exchanged or *_via_shopify, add nothing to revenue or order counts. Ad spend and sessions count every row. These totals are not guaranteed to match Shopify’s Sales report, whose source exclusions and reporting settings can differ.
Ratios are computed from totals, never by averaging daily ratios. When the denominator total is zero, the ratio shows blank. A zero numerator with a nonzero denominator shows zero. An empty date range shows blanks, not zeros.
Methodology note for the dashboard description:
Online DTC is the default. Clearing Channel sums the valid sales channels (online_dtc, amazon, retail, wholesale, tiktok_shop), and other channel rows add no revenue or orders. Revenue follows the sales report: refunds and exchanges count on the day they happen. Summary orders count placed orders under source-specific and configured exclusions. Later cancelled or refunded orders can remain. MER is net revenue divided by all ad spend in the selection, not attributed ROAS. Sales events use store reporting dates. Sessions and ad spend can follow their source reporting calendars. Some ad platforms report spend in the ad account’s currency, so totals across stores or channels with different currencies are not meaningful. Days that only carry targets show zero.
Who can see what
- Anyone you allow to write SQL against this database in Metabase can query all of that data.
- Store and channel filters are for navigation, not security.
- Metabase’s paid row and column security does not apply to SQL questions.
- Set Metabase’s own permissions to match who should see your data.
Cost
Jobs run in theBIGQUERY_JOB_PROJECT_ID shown by Copy dataset and project names. Dedicated warehouses use your warehouse project. Shared warehouses use SourceMedium’s shared query project. Jobs share that project’s billing, reservations and applicable query limits. Dashboards & Apps does not set a separate per-app spending cap.
With on-demand billing, query cost depends on bytes processed. With capacity billing, queries consume the project’s assigned slots and can compete with other workloads or increase autoscaling use. Byte counts alone do not estimate capacity charges, and daily byte quotas apply only to on-demand queries.
- On the small demo warehouse, each uncached starter query billed 10 MiB (10,485,760 bytes), so three queries billed 30 MiB. Larger scans can bill more. Cached queries can bill zero. Sync and filter-value jobs add to those query costs.
- Scheduled filter-value scans can add costs that grow with the fields and tables scanned. Setting Scanning for Filter Values to Only when adding a new filter widget avoids the daily rescan.
Replace or revoke the key
- Replace: in Dashboards & Apps, under Run it yourself, open Manage on the Metabase key and click Replace key. Download the new key file and upload it in the Metabase database settings. The old key can no longer create access tokens. Tokens already issued from it may keep working until they expire. Replacement reuses the app’s identity.
- Revoke: Revoke access disables the app identity, removes its keys and grants, then deletes the identity, preventing new warehouse queries. Pausing or offboarding your organization also disables app identities. SourceMedium does not cancel a query that is already running.
- Removing someone from your SourceMedium workspace does not revoke the key or remove their Metabase permissions. Remove their access in Metabase separately. For routine rotation, replace the key. For a compromised key, revoke the credential and create a new one for the connection. Revoking deletes the old identity.
Troubleshooting
- Access denied right after issuing the key: Google can take a minute or more to activate a new key. Wait, then sync again.
- “Unrecognized name” on a starter question: with this guide’s mappings, use
`DATASET.rpt_executive_summary_daily`exactly. For custom SQL with an alias, configure Metabase’s Table and field alias to match it. - “Not found: Dataset”: the dataset name is wrong. Copy it from the app’s Manage → Copy dataset and project names.
Related pages
Other BI tools
Connect Tableau, Power BI, and other tools that read BigQuery.
Executive summary table
Every column in
rpt_executive_summary_daily.
