Skip to content
Tech Interview Prep
Technical interview guide

Self-Service Analytics Enablement

Letting business users answer their own questions safely, without a queue of ad-hoc requests to the data team.

Minutes to read
3
Practice MCQs
25
Interview Q&A
25
Edition
v5
Editorial status
Reviewed

Scope: Current Microsoft Power BI adoption roadmap, Tableau Blueprint, Looker, dbt MetricFlow, OpenMetadata, BigQuery, Snowflake, and WCAG 2.2 guidance reviewed 2026-09-04.

Interview Q&A

Treat each question like a live interview question: answer out loud first (structure, assumptions, tradeoffs), then open the model answer to spot gaps and rehearse a tighter follow-up.

Curated: · Written: · Reviewed:

25 questions

Q&A-1

Design a self-service analytics operating model.

Answer

Assumptions first. A few hundred analysts and PMs, one cloud warehouse, a BI tool already in place, standard PII handling but no sector-specific mandate. If the org is twenty people, skip the tiers: one semantic layer and a Slack channel is the whole operating model.

The core answer. Three tiers, and the tier is chosen by the blast radius of a wrong number, not by seniority.

  • Certified. Metrics defined once in a semantic layer (dbt metrics, LookML, Cube), each with a named owner, published to a governed folder. Consumers get read-only. Definition changes go through PR review with a downstream-impact check: dbt exposures or the Looker content validator will tell you who breaks before you merge.
  • Curated exploration. Analysts get warehouse roles with read access to marts and can build their own explores and dashboards in a shared space. They cannot publish into the certified folder. Most self-service traffic lives here.
  • Sandbox. A personal schema with a spend cap, no SLA, no consumers. Promotion out of sandbox is a pull request: the author hands over ownership, the metric gets a definition and tests, and downstream consumers are checked.

Why segmentation drives certification. The tier is a function of how many people act on the number and how expensive it is to be wrong. A number in a board deck needs exactly one definition and one owner; a number in a scratch notebook needs neither. Certification is the mechanism that keeps a single definition authoritative: without a named owner, two teams will independently "fix" the same metric and diverge, and nobody notices until the numbers disagree in a meeting.

The trade-off. Centralized versus self-service is the whole question. Centralized gives one definition and a queue; self-service gives speed and N definitions. The deciding criterion is reversibility and audience: irreversible or external decisions (pricing, board reporting, regulatory) go through certified metrics only. Reversible internal exploration goes to sandbox. A healthy split is roughly 80% of queries against the curated tier, with a small certified set carrying every external number.

What actually breaks.

  • Metric drift. Two dashboards, same name, different numbers. Detect it with a metric registry that enforces one owner per metric, plus the downstream-impact check above. The registry is the control; the validator is the alarm.
  • Shadow IT. Teams export to Sheets because the certified path is slow. Detect it in warehouse query history: Snowflake's ACCOUNT_USAGE.QUERY_HISTORY will show repeated full-table scans from a BI service account, or a spike in export jobs. The fix is to make the certified path faster, not to block exports; blocking just moves the exports somewhere you can't see.
  • Cost blowup. One unpartitioned scan on a large table. Detect it with resource monitors that suspend a warehouse at a credit threshold, or per-user custom quotas in BigQuery. Give sandboxes their own capped warehouse so a runaway query can't touch production spend.
TierWhoPermissionsSLACost control
CertifiedEveryoneread24h fixshared warehouse
CuratedTrained analystsread + create in shared spacebest effortteam warehouse
SandboxAnyone trainedown schema, no publishnonecapped warehouse

Promotion trace. An analyst builds revenue_v3 in sandbox → requests promotion → the metric owner reviews the definition, adds tests, checks exposures → merged into the semantic layer → the sandbox model is deprecated and consumers migrated → the old dashboard is archived. If no owner accepts it, it stays in sandbox and is never certified. That refusal is the gate, and it has to be allowed to happen.

Measure with targets, not adjectives. Median time-to-first-answer under one day for the curated tier; 100% of exec-facing dashboards on certified metrics; each certified metric consumed by at least two teams; support tickets per 100 analysts per month; warehouse spend per analyst; and a sampled check on whether decisions actually changed. The last one is sampled because continuous measurement of it is theatre.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-2

Create role and capability tiers for analytics users.

Answer

Clarify, then answer. Two questions decide the shape: how many distinct data-sensitivity classes exist, and how many distinct job functions touch the warehouse. If either answer is one, ship three roles (reader, writer, admin) and stop. Below I assume a mid-size org: ~300 analytics users, 20 data domains, PII in three of them, and an IdP (Okta or Entra) as the source of truth for who is employed.

Two axes, not one ladder. A single ladder (consumer → explorer → analyst → …) forces one role per (tier × domain) pair. Seven tiers across 20 domains is 140 roles, and nobody audits 140 roles. Split it:

  • Functional roles: what you may do (create, schedule, certify, administer).
  • Access roles: what you may see (access_sales_masked, access_sales_pii).

A user gets exactly one functional role and one or more access roles. Role count becomes 7 + 20 = 27, and "who can read PII?" is answered by listing the two roles that carry access_*_pii.

TierFunctional roleMay doDenied
Consumerbi_viewerSELECT certified marts, view dashboardscreate objects, export raw rows
Exploreranalyst_readSELECT any masked table, create in personal schemawrite to shared schemas
Analystanalyst_writecreate/alter models in analytics, schedule taskscertify, grant roles
Stewardsteward_domainown the masking policy and data contract for one domaincertify that domain's models
Certifiercertifierapprove certificationauthor models
Platform devplatform_devDDL on warehouses, roles, tasksread PII
Adminadmin_platformeverything—

Steward and Certifier are separate on purpose: separation of duties only holds if the certifying role lacks the write grant on the object it blesses. If certifier can also ALTER the model, the control is decorative.

Mechanism. In Snowflake, roles are granted to roles, so composition is just grants:

SQL
CREATE ROLE analyst_write;
CREATE ROLE access_sales_masked;
GRANT ROLE access_sales_masked TO ROLE analyst_write;
GRANT ROLE analyst_write TO ROLE analytics_users;
GRANT ROLE analytics_users TO USER jdoe;

Snowflake puts no TTL on a grant, so time-bound elevation is something you build: write the grant and its expiry to a table, and have a scheduled task revoke expired rows. BigQuery does it natively: an IAM Condition on request.time expires the binding with no job to run:

Shell
gcloud projects add-iam-policy-binding my-proj \
  --member="user:jdoe@example.com" \
  --role="roles/bigquery.dataViewer" \
  --condition='expression=request.time < timestamp("2025-06-01T00:00:00Z"),title=temp_pii'

If your warehouse can't express expiry, push it to the IdP: put the elevated group membership in Okta with an expiry and let SCIM remove it. One revocation path beats two.

Failure modes.

  • Role explosion. Detected by counting roles and grants each quarter; the symptom is a review where nobody can name the owner of analyst_write_v2. Cost: the access review becomes a rubber stamp.
  • Stale elevation. The revoke task fails silently, or the expiry row is deleted. Detect by reconciling the expiry table against SHOW GRANTS daily: a grant with no expiry row is a standing grant. Cost: PII access that outlives the ticket.
  • Offboarding gap. The user is gone from the IdP but the warehouse user survives. Detect with SNOWFLAKE.ACCOUNT_USAGE.USERS.LAST_SUCCESS_LOGIN older than 90 days, cross-checked against the IdP roster. Cost: a licence plus a live credential.
  • External share. A share granted to a broad role hands every consumer account the same data. Detect with SHOW GRANTS TO SHARE <name>; re-audit whenever a tier's grants change.

When the flat model wins. Under ~20 users, one dataset, no PII: three roles beat seven. Every extra tier is a grant you must review and a place for drift. The deciding criterion is the product of sensitivity classes and job functions, when that product is small, the two-axis model is pure overhead.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-15

Define ownership for datasets, metrics, and dashboards.

Answer

The 90-second answer. Ownership is a set of named accountabilities attached to metadata your tooling can query, not a name in a wiki page. Four roles, each with a primary and a backup: business owner, data/metric owner, technical steward, content owner. Datasets get the warehouse tag, metrics get the dbt model contract, dashboards get the Looker folder and the exposure. Each role maps to a field that already exists in the stack, so "who owns this?" is a query.

RoleAccountable forWhere it lives
Business ownerwhy the asset exists, retirement, metric-definition changesdbt groups[].owner, DataHub BUSINESS_OWNER
Data/metric ownersemantic meaning, SQL logic, access grantsmeta.owner in schema.yml, DataHub TECHNICAL_OWNER
Technical stewardpipeline reliability, freshness, costAirflow default_args["owner"], dbt source freshness, Snowflake resource monitor
Content ownerdashboard UX, filters, whether it misleadsLooker folder + content_metadata_access

dbt 1.5+ carries the first two directly:

YAML
# dbt_project.yml
groups:
  - name: finance_analytics
    owner:
      name: Priya Raman
      email: priya@example.com
      slack: finance-analytics
YAML
# models/marts/schema.yml
models:
  - name: fct_orders
    group: finance_analytics
    access: protected
    contract: {enforced: true}
    meta: {owner: finance_analytics, backup: dan@example.com}
exposures:
  - name: weekly_kpis
    type: dashboard
    owner: {email: priya@example.com}
    depends_on: [ref('fct_orders')]

Snowflake holds the same fact for objects dbt does not manage:

SQL
ALTER TABLE analytics.fct_orders SET TAG owner = 'finance_analytics';
SELECT TAG_NAME, TAG_VALUE, OBJECT_NAME, OBJECT_TYPE
FROM SNOWFLAKE.ACCOUNT_USAGE.TAG_REFERENCES WHERE TAG_NAME = 'OWNER';

ACCOUNT_USAGE lags by up to 2 hours; INFORMATION_SCHEMA.TAG_REFERENCES is immediate but needs privileges on the object. Airflow: DAG("load_orders", default_args={"owner": "data-platform"}, owner_links={"data-platform": "https://wiki.example.com/data-platform"}). The owner renders in the UI and links to the runbook.

Failure modes and detection.

  • Orphaned assets. jq -r '.nodes[] | select(.config.meta.owner == null) | .unique_id' target/manifest.json lists every model with no owner; run it in CI.
  • Silent metric drift. The data owner leaves, someone edits the definition, the number in a board deck moves 20%. contract: {enforced: true} plus a dbt test on accepted values makes that edit fail CI instead.
  • Cost blowout. No steward means nobody watching; a Snowflake resource monitor with CREDIT_QUOTA suspends the warehouse and pages the owner.
  • Broken dashboards. dbt build --select +exposure:weekly_kpis fails when an upstream model breaks, which is the exposure earning its keep.

Trade-offs. Under ~10 analysts, merge data/metric owner with technical steward. Never merge business owner with data owner: one person defining and validating a metric is a conflict of interest. Above ~100 analysts, add a governance lead and DataHub DATA_STEWARD owners. The model is wrong for a data mesh, where domain teams own their products end-to-end and access: public on their models is the contract; and in regulated settings, where you add a compliance owner and pull lineage from SNOWFLAKE.ACCOUNT_USAGE.ACCESS_HISTORY.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-3

Design the self-service data product catalog.

Answer

I'd clarify first: is this catalog for all analysts or just domain teams? Assume a 500-person data org, 200 products, using a metadata store like DataHub or OpenMetadata. The core answer: a self-service catalog is a search index plus a contract. Each data product entry must answer four questions: what is it, who owns it, how fresh is it, and can I use it? If any of those is missing, the catalog fails.

The metadata model I'd enforce: owner (a team, not a person), SLA (freshness and availability), schema with column-level descriptions, lineage to upstream sources, access classification (public, internal, restricted), and a support route (Slack channel or ticket queue). Certification is a separate flag set by a governance board. I'd store this in a metadata store like DataHub, which supports these entities.

Search ranking is where behavior changes. If you rank purely by usage, a popular but stale or uncertified product wins. I'd use a weighted score: certified (weight 3), freshness within SLA (weight 2), usage (weight 1, log-scaled), and penalties for stale (-2) or deprecated (-5). For example, product A: certified, fresh, 100 queries/day -> score = 3 + 2 + 1log10(100)=2 -> 7. Product B: uncertified, stale, 10,000 queries/day -> score = 0 + 0 + 1log10(10000)=4 -2 = 2. So A ranks above B despite 100x fewer queries. That's the mechanism: certification and freshness gate popularity.

Failure modes: 1) Stale metadata: the catalog says fresh but the pipeline broke. Detect by comparing last successful run timestamp to SLA; if overdue, automatically flip a badge and demote. 2) Orphaned ownership: owner left. Detect by monitoring response time to access requests or alerts; after 7 days, escalate to domain lead. 3) Popularity gaming: a team runs a script to inflate query counts. Detect by looking at distinct users; if one user accounts for >80% of queries, discount. 4) Certification drift: a certified product changes schema without re-certification. Detect by schema change hooks that revoke certification until re-approved.

Trade-offs: open publishing vs. curation. Open publishing gets coverage fast but creates noise. Curation ensures quality but bottlenecks. I'd start with open publishing for raw assets, but require certification for anything labeled 'trusted'. Another trade-off: strict freshness gating can hide useful but slow-moving products (e.g., annual reference data). So allow per-product SLA overrides. Alternatives: a fully centralized catalog team vs. federated domain stewards. Centralized works for <50 products; federated scales but needs strong metadata standards. Deciding criteria: regulatory pressure (if SOX, certify everything), team size, and how many domains.

Finally, feedback loops: capture search queries that return no results, and user ratings. Use that to prioritize new products. But never let ratings override certification. A 5-star uncertified product still ranks below a 3-star certified one.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-4

Define an analytics content certification lifecycle.

Answer

Assumptions. "Analytics content" here means dashboards, semantic-layer metric definitions, and the certified datasets behind them. I'll assume a warehouse (Snowflake or BigQuery), a transform layer (dbt 1.6+), a BI tool (Looker or Tableau), and a catalog (DataHub). With 20 dashboards you don't need this; with 2,000 and a finance team reconciling revenue, you do.

The answer. Five states, each entered through a gate that is evidence, not opinion:

StateEntry gateOwnerEvidence
Draftexists on a dev branchauthornone
Reviewedpeer + steward sign-offtechnical stewardtests pass, lineage resolves
Certifiedbusiness owner signs the metric contractbusiness ownerfreshness SLA met 14 consecutive days, one consumer validated the numbers
Deprecatedreplacement namedstewarddeprecation_date set, consumers notified
Retiredzero queries for 30 daysstewardaccess logs

Certification is tiered, because review is the expensive part. Tier 1 (revenue, regulatory, exec-facing) needs an independent reviewer who is not the author plus a named business owner. Tier 2 (team dashboards) needs only the steward. Tier 3 (exploratory) is never certified: it carries a "not certified" label in the catalog so nobody mistakes it for truth.

Revalidation is time-bound: 90 days for Tier 1, 180 for Tier 2. The clock resets on re-signing, not on a passing test run: a green suite says the SQL still executes, not that the metric still means what finance thinks it means.

The gate doing the real work is the metric contract: it pins grain, filters, timezone, and owner. Freshness, lineage, and tests are checks that the contract still holds.

YAML
# dbt 1.6+, models/marts/fct_orders.yml
models:
  - name: fct_orders
    latest_version: 2
    deprecation_date: 2025-06-01
    config:
      contract: {enforced: true}
    columns:
      - name: order_id
        tests: [unique, not_null]
sources:
  - name: raw
    freshness:
      warn_after: {count: 6, period: hour}
      error_after: {count: 12, period: hour}

Failure modes, and how each is caught:

  • Silent metric change. Someone edits the revenue filter; the dashboard still renders. Caught by contract enforcement failing the build, plus a row-count and sum delta against yesterday. Cost: a quarter of mis-reported numbers before anyone notices.
  • Stale certification. The owner left. Caught by revalidation expiry in the catalog: the item drops to "review overdue" automatically instead of staying green.
  • Dashboard rot. The model is fine; the dashboard's saved query broke. Caught by Looker's Content Validator or Tableau Catalog's data-quality warnings, run nightly.
  • Orphan. Nobody queries it. Caught by 30-day access logs; retire rather than maintain.

Trade-offs. Independent review catches definition errors a self-certifying author cannot see, but it costs roughly a reviewer-day per Tier 1 item and creates a queue, so cap it at Tier 1 and let stewards self-certify Tier 2. Hard deprecation (queries fail) forces migration but breaks exec dashboards mid-quarter; soft deprecation (banner plus deprecation_date) is slower but safer, so go hard only after the replacement has been certified for 30 days.

During a material incident, annotate certification rather than delete it. Pulling the badge sends people to uncertified copies, which is worse than a badge carrying a warning.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-13

How do you define and enforce freshness, completeness, and accuracy SLAs for self-service data products, and how do you surface those reliability commitments to consumers so they can judge whether a dataset is fit for their analysis?

Answer

The 90-second answer. Treat each dataset as a product with a contract: three measurable dimensions, each with a threshold, a named owner, and a test that runs on every load. Freshness is the lag from source event to queryable. Completeness is that the expected rows and partitions actually arrived. Accuracy is agreement with a trusted reference inside a stated tolerance. Enforce the tests in the transformation layer, publish the results where consumers already look, the catalog and the BI tool, and show current status plus 30-day history so someone can judge fit-for-purpose before they build on it.

Defining the thresholds. Derive numbers from the consumer's decision cadence, not from what the pipeline happens to do. A daily finance close needs data by 06:00 UTC; an operational dashboard needs 15-minute lag. Tier datasets (critical, important, exploratory) and set thresholds and alert routing per tier. Exploratory datasets get a catalog badge and no paging.

DimensionThreshold exampleTestConsumer sees
FreshnessAvailable by 06:00 UTC; lag ≤ 1hdbt source freshness on _loaded_atStatus badge, max(loaded_at)
Completeness24/24 hourly partitions; rows within ±5% of same weekdayPartition-count SQL, row-count bandTest result, 30-day pass rate
AccuracyRevenue within 0.1% of ledger; no null order_idReconciliation query, not_null/uniqueReconciliation delta, owner

Enforcement. Run freshness before the model builds, tests after. For critical datasets the orchestrator (Airflow, Dagster) blocks downstream models on a failed test rather than letting bad data propagate.

YAML
# models/sources.yml — dbt 1.7+
sources:
  - name: raw
    schema: raw
    tables:
      - name: orders
        loaded_at_field: _loaded_at
        freshness:
          warn_after: {count: 1, period: hour}
          error_after: {count: 2, period: hour}
        columns:
          - name: order_id
            tests:
              - not_null
              - unique

Freshness alone only reads the max timestamp, so a missing mid-day partition passes it. Pair it with a completeness check that returns zero rows when the day is whole:

SQL
with daily as (
  select count(distinct partition_hour) as hours_present
  from analytics.fct_orders
  where partition_hour >= date_trunc('day', current_timestamp - interval '1 day')
    and partition_hour <  date_trunc('day', current_timestamp)
)
select * from daily where hours_present <> 24

Accuracy is the expensive one. Reconcile a bounded window (yesterday's partition, not all history) against the system of record, and add cheap invariants (no negative amounts, order count matches payment count) that run every load.

Surfacing. One catalog page per dataset: the SLA definition, current status, last successful refresh, 30-day test pass rate, owner, and a subscribe link. Also expose max(loaded_at) as a column in the BI layer so staleness is visible at query time, not only on a dashboard nobody opens.

Trade-offs and failure modes. Tight thresholds cause alert fatigue, 200 datasets at a 1% false-positive rate is two pages a day, so loosen a check only after fixing it, never to silence it. Row-count bands false-positive on seasonal spikes; compare against the same weekday, not a flat 7-day average. Reconciliation can pass while both sides read the same broken upstream, so keep one independent invariant. And thresholds set once and never revisited drift out of relevance: review them quarterly with the owner.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-5

Design analytics sandbox environments.

Answer

Core answer (first 90 seconds)

Two questions decide the design: what data the sandbox may touch (raw production, masked production, or synthetic) and who shares it. One analyst, a team, or an external partner. Those pick the isolation tier; everything else is configuration.

My default: a sandbox is its own compute and storage boundary with its own identity, a hard spend cap, masked or cloned data, and an expiry date. It is not a schema inside the production account with broad grants.

TierHowUse whenWhat it costs you
Separate account / projectSnowflake account per team; GCP project per team inside a VPC Service Controls perimeterRegulated data, external partnersHighest isolation; duplicated users, roles, network config
Shared account, isolated namespaceSnowflake database + dedicated warehouse; BigQuery dataset with a custom per-user quota; Databricks Unity Catalog catalogInternal teams on masked dataOne over-broad grant leaks across teams
Point-in-time cloneCREATE DATABASE sandbox CLONE prod; BigQuery table copyShort exploration on prod-shaped dataDrifts from prod the moment it is created; needs its own expiry

Mechanism: why each control exists

Quotas exist because the failure mode is silent. An analyst leaves a Snowflake XS warehouse running and it burns 1 credit/hour; at list on-demand pricing near $2/credit that is about $1,440/month for one forgotten warehouse (720 h × $2). So set AUTO_SUSPEND = 60 explicitly rather than trusting the default, and attach a resource monitor that notifies at 75% and suspends at 100% of a monthly credit quota. The BigQuery equivalent is a custom quota on query usage per user per day, say 1 TiB, plus maximum_bytes_billed on each query, so a missing partition filter fails one query instead of the month's budget.

Provenance exists because a sandbox number that looks like a certified number is worse than no number. Tag every sandbox table with source table, owner, and refresh timestamp (Snowflake object tags, BigQuery labels, dbt meta) and keep sandbox schemas out of the semantic layer that feeds dashboards. A dashboard reading sandbox.orders should be a build failure, not a discovery.

Expiry exists because abandoned assets are the norm. Set BigQuery dataset default partition expiration, keep Time Travel on the clone at 1 day, and run a scheduled job that drops sandbox objects with no query in 30 days: Snowflake ACCOUNT_USAGE.ACCESS_HISTORY, BigQuery INFORMATION_SCHEMA.JOBS_BY_PROJECT.

Promotion and failure modes

Promotion is a pull request, not a copy. The sandbox model lives in the same dbt repo, CI runs dbt build --select state:modified+ against production credentials, and the reviewer sees the diff. Nothing moves by hand.

Test these before calling it done: cross-tenant reads (grant a sandbox role a second team's schema and confirm it fails), copied credentials (long-lived keys pasted into notebooks. Scan for them and issue short-lived tokens instead), stale extracts (a table whose max timestamp is 90 days old), abandoned warehouses, and quota exhaustion (one user's 1 TiB/day cap blocking a team's shared reservation).

When a sandbox is the wrong tool: if the work is a recurring production report, it belongs in the governed pipeline with a real SLA. A sandbox with a quota and an expiry will break it.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-6

Build a lightweight analytics promotion workflow.

Answer

Core answer (first 90 seconds). "Promotion" means moving an analysis out of someone's scratch space (a personal notebook, a sandbox_* schema, a dashboard in a personal folder) into a shared asset with a named owner, a tested definition, and a scheduled build. Lightweight means the gate is a pull request against a template, not a governance review board. The whole thing should cost the author an afternoon, not a sprint.

Assumptions I'd state up front: dbt on Snowflake (or BigQuery), Git with CI, a BI layer (Looker/Metabase), orchestration via dbt Cloud or Airflow. Off dbt, the same steps map onto whatever runs your SQL.

1. Intake: is this worth promoting? The expensive mistake is promoting everything. Gate on: two or more distinct consumers, or a decision that recurs on a cadence. One person's one-off stays in the sandbox. This single criterion kills most of the queue.

2. Owner. A person, not a team, plus a backup, recorded in the model's meta and in CODEOWNERS so PR review routes automatically instead of waiting on a channel.

3. Semantics. Replace hardcoded filters with a governed definition. A private WHERE status = 'complete' becomes a metric in metrics.yml referenced by the BI layer, so "completed order" means one thing everywhere.

4. Tests. Not decoration: the ones that catch real breakage:

YAML
# models/marts/orders.yml
models:
  - name: fct_orders
    meta: {owner: "@dana", tier: gold}
    columns:
      - name: order_id
        tests: [unique, not_null]        # grain key
      - name: status
        tests:
          - accepted_values:
              values: ['placed','shipped','complete','refunded']
sources:
  - name: raw
    freshness:
      warn_after:  {count: 6,  period: hour}
      error_after: {count: 24, period: hour}

5. Access and lineage. Confirm the model reads only sources the team may read; tag PII columns and mask them. No new grants as a side effect of promotion.

6. Deploy and roll back. Merge triggers CI running dbt build --select state:modified+ against a PR schema, then prod. Rollback is git revert; state-based selection rebuilds only changed nodes, so it's minutes, not hours.

7. Migrate, then retire. Point consumers at the new asset, soak two weeks, then drop the sandbox copy with a deprecation notice in the BI tool.

The PR gate, as a table:

gatecheckwho
intake≥2 consumers or recurring decisionauthor
ownerperson + backup in meta, CODEOWNERS entryauthor
semanticsno hardcoded filters; metric in metrics.ymlreviewer
testsunique/not_null on grain, accepted_values, freshnessCI
accessPII tagged, no new grantsreviewer
deployCI builds state:modified+ on PR schemaCI

Trade-off: dual-run vs cutover. Dual-run when the number drives money and you need to reconcile old and new for a period; cutover when it's low-stakes. Dual-run costs two pipelines, drift, and the question of which is authoritative when they disagree: settle that before you start, not after.

Failure modes and how you'd see them.

  • Silent drift: someone keeps editing the sandbox copy after promotion. Detect via query history on the old schema.
  • Test theater: tests fail and nobody looks. Route alerts to a channel with the owner; track time-to-acknowledge.
  • Metric fork: two teams define "active user" differently. Detect with a CI uniqueness check on metric names.
  • Stale but confident: the source stops landing and the dashboard shows old numbers with no warning. Freshness test plus a visible "last updated" stamp.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-7

Govern personal analytics content without blocking experimentation.

Answer

Assumptions. Mid-size company, self-service BI (Tableau, Looker, Power BI) on a cloud warehouse with row-level security and column classification. Analysts have personal folders where workbooks, dashboards and extracts need no review. The job is to keep that freedom while stopping personal content from silently becoming unowned production.

The answer: tier by blast radius, promote on a trigger. Personal content sits in a sandbox with hard limits. Only data the analyst already has access to, a per-user storage quota, no external sharing, and a retention clock (say 90 days) unless promoted. Nothing is blocked at creation. When an item crosses a threshold of operational importance, the platform prompts promotion to a team or certified tier. Promotion is not an approval gate; it is the path to a named owner, a refresh SLA, a backup owner and monitoring. Ignore the prompt and the item goes read-only in quarantine, then archives.

Detection. A nightly job pulls metadata and audit logs from the BI platform's API and scores each item on six signals: unique viewers in 30 days, external share count, refresh interval, sensitive-column count on the source, owner inactivity, and downstream dependency count. The thresholds below are starting points, not laws: tune them against your own acceptance rate.

Python
# Python 3.12
THRESHOLDS = {
    "viewers_30d": 20,          # strictly greater
    "external_shares": 0,       # any share crosses
    "refresh_minutes": 60,      # strictly less
    "sensitive_cols": 0,        # any PII/PHI column crosses
    "owner_inactive_days": 90,
    "downstream_deps": 5,
}

def crossed_signals(item):
    checks = {
        "viewers_30d": item.unique_viewers(days=30) > THRESHOLDS["viewers_30d"],
        "external_shares": item.external_share_count() > THRESHOLDS["external_shares"],
        "refresh_minutes": item.refresh_interval_minutes() < THRESHOLDS["refresh_minutes"],
        "sensitive_cols": item.data_source.sensitive_column_count() > THRESHOLDS["sensitive_cols"],
        "owner_inactive_days": days_since(item.owner.last_login) > THRESHOLDS["owner_inactive_days"],
        "downstream_deps": item.downstream_dependency_count() > THRESHOLDS["downstream_deps"],
    }
    return [name for name, hit in checks.items() if hit]

def triage(item):
    hit = crossed_signals(item)
    if "sensitive_cols" in hit:      # regulated data: one signal is enough
        return "promote", hit
    if len(hit) >= 2:                # otherwise require two
        return "promote", hit
    return "stay", hit

Trace. Item "Regional churn": 35 unique viewers/30d, 0 external shares, refresh every 30 min, 0 sensitive columns, owner last login 12 days ago, 3 downstream deps.

  • viewers_30d: 35 > 20 → True
  • external_shares: 0 > 0 → False
  • refresh_minutes: 30 < 60 → True
  • sensitive_cols: 0 > 0 → False
  • owner_inactive_days: 12 > 90 → False
  • downstream_deps: 3 > 5 → False

hit = ["viewers_30d", "refresh_minutes"]. No sensitive_cols, length 2 → "promote". The owner gets: "35 viewers, refreshes every 30 minutes. Promote to a team project for an SLA and backup owner, or justify staying personal." They have 14 days; no action moves it to read-only quarantine, archived 30 days later.

Change one number (20 viewers exactly, refresh exactly 60 minutes) and both strict comparisons fail, hit = [], and the item stays personal. The boundary is deliberate: exactly hourly is not yet a production cadence.

Failure modes.

  • False positive: a one-off analysis for a board meeting gets flagged. Detect by tracking promotion-prompt acceptance; under ~50% over a month means thresholds are too tight. Cost: analysts move work to spreadsheets or a shadow tool.
  • Orphaned content: owner leaves, the extract keeps refreshing and feeds a live dashboard. Detect via owner account disabled or no login for 90 days combined with downstream_deps > 0. Cost: stale numbers presented as current.
  • Sensitive leak: analyst builds a personal extract over a PII column. Detect via the classification tag on the source column plus the audit-log entry for extract creation. Cost: a compliance finding.
  • Quota exhaustion: user hits the per-user cap mid-analysis. Detect at storage usage above 80% of quota. Cost: blocked work and the temptation to export locally.

Alternatives. Review everything: safe, but days of queue time per dashboard and experimentation dies. No governance: fast, but shadow production, leaks and orphans. Tiered governance with sandbox limits, triggers and automated enforcement is the one that holds both ends.

Deciding criteria. Promote immediately when the source carries PII/PHI. Otherwise promote on audience (>20 viewers), cadence (<1h refresh), or business criticality (exec reporting). Loosen for short-lived, small-audience work.

Make promotion one click with a template that fills in owner, refresh and monitoring. If promotion costs an analyst an afternoon, they route around it and you get the shadow production you were trying to prevent.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-8

Design role-based analytics literacy training.

Answer

Core answer. Role-based means keying the curriculum to the decisions a role actually makes, not to the tools it touches. The same concept (grain, freshness, filters) is taught at different depth with a different decision attached. Assume ~550 people: 400 PM/marketing/ops/support, 120 analysts and data scientists, 25 analytics engineers, on a Snowflake warehouse with dbt transforms and Looker as the BI layer. Four tiers, four weeks, roughly four hours per person.

TierWhoDecision it ownsFormatPass bar
0all ~550read a dashboard; ask vs self-serve30 min async8/10 scenario quiz
1PM, marketing, ops, support ~400scope a launch, size a segment, read a funnel4×60 min live, 3 graded tasks3 tasks, ≥80% on explanation rubric
2analysts, DS ~120publish a number others will act on6×90 min, reproduce-a-metricreproduce a published metric from raw tables and explain the delta
3analytics engineers, senior DS ~25own a metric contract, change the semantic layer2 half-days, gatedreview a dbt/LookML change and catch the fan-out

Tier 1 carries the live sessions because it is the only tier large enough to matter; 0, 2 and 3 are async or gated. 550 × 4 h ≈ 2,200 person-hours, about 1.1 FTE-years: worth spending on the tier that ships the most decisions, not spread evenly.

Sequencing follows the decision, not the tool. Find the certified source → check its freshness stamp and grain → filter and set the time window → compare like with like → interpret → escalate. Each session ends with a task where the wrong answer is plausible.

Assessment is task-based. A quiz measures recall; the rubric measures judgment. Score the explanation, not just the number: "the total doubled because the region join is many-to-many" passes; "I added a filter" does not. Two raters score a 10% sample; below 80% agreement, the rubric is rewritten, not the candidate failed.

Worked trace (hypothetical). Tier 1 exercise: a dashboard shows 12,400 weekly active users. Add the region filter; the total reads 15,900. Trace: 12,400 users, of whom 3,500 belong to two regions, so the many-to-many join emits 12,400 + 3,500 = 15,900 rows. The filter changed the grain, not the population. Candidates who say "the filter is broken" fail the task; candidates who say "the join fans out" pass.

Trade-offs. Central vs embedded: central owns the rubric and the certified-source list, managers run the sessions. The deciding criterion is schema churn, if the warehouse ships breaking changes more than monthly, embedded wins, because central exercises rot faster than they can be rewritten. Gate vs signal: certification as a gate on prod dashboard access raises quality but turns the analytics team into a help desk; use it as a signal for Tier 1 (dashboards show "viewer uncertified") and a gate only for Tier 3 write access to the semantic layer.

Failure modes. Certification theater: people pass and still ship wrong numbers; detect by auditing 20 dashboards a quarter against certified sources, and if more than 10% cite an uncertified source, the assessment is measuring recall. Curriculum rot: a renamed column breaks the exercises; detect by a >20-point pass-rate drop after a schema change, fix by pinning exercises to a frozen snapshot. Gatekeeping: the Tier 3 queue exceeds two weeks, so people route around it. Metric drift: count distinct definitions of "active user" in the semantic layer; if it grows after training, the metric-contract session is not landing.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-9

How do you enable business users to independently validate metric consistency and lineage against certified semantic models before publishing?

Answer

The 90-second answer

"Validate" is two questions, and they need different machinery. First: does this metric compute the same number as the certified definition? Second: does it come from certified lineage? A business user can answer both by reading a diff: they should never have to read SQL or file a review ticket.

Assumptions: a semantic layer (dbt MetricFlow, Cube, Looker, Power BI) is the source of truth and can compile a metric to SQL; the user has read access to the certified model but not to raw tables; the warehouse is Snowflake, which matters for the query below.

Two mechanisms do the work. The authoring tool binds the report to the certified model so the metric definition is inherited, not retyped: a local measure is allowed but flagged. And a platform-generated reconciliation query runs the author's expression and the certified expression at the same grain and shows the delta per period. The user's job is to read the diff.

What the user actually reads

Side-by-side definition diff, generated from the semantic layer's compiled SQL:

Certified gross_revenueAuthor's local measure
Sourceanalytics.fct_orders_certifiedworkspace_sandbox.custom_revenue_view
ExpressionSUM(net_amount + tax_amount - refund_amount)SUM(txn_price + txn_tax)
Grainone row per order_idone row per txn_id
Time columnorder_date (America/New_York)txn_time (UTC)
Refundsexcludedincluded

That table is the whole lineage check: the user sees which upstream model feeds the number and where the two expressions diverge. Diffing compiled SQL strings is brittle; the harness diffs the parsed expression tree so SUM(a+b) and SUM(b+a) don't raise a false alarm.

The reconciliation query

Generated by the platform, not written by the user: a user-authored check gets written to pass.

SQL
-- Snowflake. Runs nightly and on every publish attempt.
WITH bounds AS (
  SELECT DATEADD(day, -90, CURRENT_DATE()) AS start_date
),
canonical AS (
  SELECT DATE_TRUNC('month', o.order_date) AS metric_period,
         SUM(o.net_amount + o.tax_amount - o.refund_amount) AS canonical_val
  FROM analytics.fct_orders_certified o CROSS JOIN bounds b
  WHERE o.order_date >= b.start_date
  GROUP BY 1
),
author AS (
  SELECT DATE_TRUNC('month', t.txn_time) AS metric_period,
         SUM(t.txn_price + t.txn_tax) AS author_val
  FROM workspace_sandbox.custom_revenue_view t CROSS JOIN bounds b
  WHERE t.txn_time >= b.start_date
  GROUP BY 1
)
SELECT COALESCE(c.metric_period, a.metric_period) AS metric_period,
       COALESCE(c.canonical_val, 0) AS canonical_val,
       COALESCE(a.author_val, 0)    AS author_val,
       COALESCE(a.author_val, 0) - COALESCE(c.canonical_val, 0) AS delta,
       (COALESCE(a.author_val, 0) - COALESCE(c.canonical_val, 0))
         / NULLIF(COALESCE(c.canonical_val, 0), 0) AS delta_pct
FROM canonical c
FULL OUTER JOIN author a ON c.metric_period = a.metric_period
WHERE c.metric_period IS NULL
   OR a.metric_period IS NULL
   OR ABS(COALESCE(a.author_val, 0) - COALESCE(c.canonical_val, 0))
      > 0.005 * ABS(COALESCE(c.canonical_val, 0));

Tolerance is 0.5% relative per period, plus a hard rule that a period present on only one side is always a failure. The FULL OUTER JOIN matters: an inner join silently drops the missing-period case, which is the signature of a filter or fan-out mismatch.

Trace with three months of data: certified: Jan absent, Feb 800,000.00, Mar 1,000,000.00; author: Jan 120,000.00, Feb 800,000.00, Mar 968,000.00:

  • Jan: c.metric_period IS NULL → returned. delta = 120,000.00, delta_pct NULL (denominator is zero).
  • Feb: |0| > 0.005 × 800,000 = 4,000? No → not returned.
  • Mar: |-32,000| > 0.005 × 1,000,000 = 5,000? Yes → returned, delta_pct = -0.032.

Two rows come back, and the UI renders them as "January missing from certified source" and "March is 3.2% low."

Failure modes and how they surface

  • Fan-out: joining the fact to a dimension at a coarser grain duplicates rows. Detected by comparing COUNT(*) to COUNT(DISTINCT order_id) on the author's view; a ratio above 1 is duplication, not a metric difference.
  • Timezone boundary: txn_time in UTC vs order_date in America/New_York moves a day of revenue between months. Detected when the delta concentrates on the first and last day of each period and collapses once both columns are cast to one zone.
  • Refunds: certified subtracts refund_amount, the author doesn't. Detected when the delta is positive and approximately equals the period's refund total, which the harness prints alongside.
  • Snapshot skew: certified refreshed 2h ago, author's view live. Re-run both against the same partition; if the delta vanishes, it was skew.
  • Partial current period: exclude the current month, or compare only through the last closed day.

Publication states

StateCriteriaScope
SandboxAny local measure or unbound sourcePersonal workspace, named viewers only, "Not certified" banner
AlignedEvery measure resolves to a certified definition; delta within 0.5% per period for the last 3 complete months; no missing periodsDepartment workspace, scheduled refresh
CertifiedAligned, plus lineage path recorded in the catalog and a named ownerEnterprise distribution, indexed in the catalog

The reconciliation keeps running after publish: a source schema change that breaks the certified model shows up as delta drift on the next run, not as a support ticket.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-16

Design analytics starter templates and examples.

Answer

Core answer (say this first)

I'd start by pinning down what "template" means, because it gets used for two different things. I'll assume it's a versioned, governed artifact a team clones: a dashboard or notebook that carries its metric definitions, cost limits and access rules with it, not a screenshot or a wiki page. I'll also assume a semantic layer (Looker, Superset, or dbt with a query layer) and more than one team; with one team a template is just a saved dashboard.

Given that, a template has three layers, and the whole design question is which layer is fixed and which is an extension point.

  1. Semantic contract: fixed. Metric name, definition, unit, time grain, and the certified source. weekly_active_users is "distinct users with ≥1 session in the trailing 7 days", sourced from the certified sessions model. A clone may add dimensions and filters; it may not redefine the metric or repoint the source. That's what keeps two teams' "active user" numbers comparable.

  2. Presentation: fixed by default, overridable. Layout, color, navigation. Ship accessible defaults: colorblind-safe categorical palette, 4.5:1 contrast on text, no color-only encoding of a series, keyboard-reachable filters. A team can reorder panels; it can't drop the freshness banner.

  3. Guardrails: fixed, non-negotiable. Cost limit, row-level security, sharing default. These are the reason to have a template at all.

Templates are versioned: a semantic or security fix bumps the version, and clones marked critical are migrated rather than left on the old one.

Concrete example. A dbt metric definition and a Looker access filter:

YAML
metrics:
  - name: weekly_active_users
    label: Weekly Active Users
    description: "Distinct users with >=1 session in the trailing 7 days"
    type: simple
    type_params:
      measure: active_users
LOOKML
explore: orders {
  access_filter: {
    field: orders.region
    user_attribute: region
  }
}

The cost guardrail rides on the template's scheduled queries: set maximum_bytes_billed (BigQuery) so an unpartitioned scan is rejected rather than billed, and a Snowflake resource monitor with a credit quota so a runaway template can't drain the warehouse. STATEMENT_TIMEOUT_IN_SECONDS defaults to 172800 (48 hours): far too long for a template query; set it to something like 300.

Trade-offs. Template vs. generator vs. free-form:

approachbuild costconsistencywhen to choose
Template (clone)low per teamhigh≥3 teams need the same decision
Generator (scaffold emits the artifact)high oncemediumshape varies per team but rules don't
Free-formzerononeone-off exploration, incident work

Don't template exploratory or incident analysis: the guardrails cost more than they save when the question is unknown.

Failure modes.

failurewhat breaksdetection
Template driftclones redefine a metric; numbers divergediff each clone's definitions against the semantic layer (dbt exposures, Looker content validator)
Cost blowupunpartitioned scan on a large fact tablep95 bytes-scanned per template in query history
False freshnessheader says "fresh" because the query ran, not because upstream loadedwire the banner to the orchestrator's last-success timestamp, not query time
RLS leakuser attribute unset → filter returns all rowscanary user per region in CI

Decision criterion: if three or more teams need the same decision, template it; if the shape varies but the rules don't, generate it; otherwise leave it free-form.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-10

Design a federated analytics support model.

Answer

Assumptions. 600 analysts across 12 business domains; a central platform team of 8 owning Snowflake, dbt, Airflow and Looker; no dedicated support org. The design question is who answers what, and where the seams are enforced.

Core answer. Federated support splits the answer from the machinery: the domain owns the meaning, the platform team owns the system. Three tiers, each with a named owner and a written boundary.

Tier 0: self-serve. Searchable docs, dbt model descriptions, a known-issues page, and a Slack channel whose history is searchable. No owner on the clock, but every page has a doc owner and a last verified date.

Tier 1: domain champion. One named analyst per domain, 4 hours a week ring-fenced, owns domain semantics, local pipeline debugging, and onboarding. Responds within one business day.

Tier 2: central platform team. On-call rotation. Owns platform incidents, access and governance, cross-domain semantics, and performance. P1 acknowledged in 15 minutes, P2 in 4 hours.

Tier 3: data council. Weekly 30 minutes. Decides contested metric definitions and new-domain onboarding.

The boundaries carry more weight than the tiers. Central does not write domain business logic, does not own domain dashboards, and does not approve ad-hoc pulls. Domains do not change platform config, grant access, or define a cross-domain metric unilaterally.

TierOwnerScopeSLAWeekly capacity
0Doc ownersHow-to, known issues, model docsnone~495 resolved
1Domain championDomain semantics, local pipelines1 business day12 × 30 = 360
2Platform on-callIncidents, access, cross-domain, perfP1 15 min / P2 4 h~64
3Data councilContested definitions, onboardingweeklyn/a

Does the arithmetic close? 600 analysts at ~1.5 questions a week is 900. Tier 0 absorbs 55% (495), leaving 405. Twelve champions at 30 each take 360, leaving 45 for Tier 2. Tier 2 has roughly 32 engineer-hours budgeted (10% of 8 engineers); at 30 minutes a ticket that is ~64, so 45 leaves headroom for incidents. If Tier 0 resolution drops below 40%, the queue lands on champions and the model starts to fail.

Trade-off. Centralized support gives one consistent answer and one control point, but it caps at the platform team's spare hours: here ~64 tickets against 900 questions, so 93% of demand would queue. Federated scales with domain headcount and keeps local context. Do not federate when there are fewer than three domains, when the schema churns weekly (champions cannot keep up with semantics that move), or when a regulator requires a single control point over access. In those cases centralize and accept the queue.

Failure modes.

Champion becomes a help desk. Detect: ring-fenced time exceeded three weeks running, or the champion's own OKR delivery slips. Fix: rotate quarterly and split the domain if it is genuinely too large.

Answer divergence. Two domains define "active user" differently and the exec dashboard disagrees with the product dashboard. Detect: monthly audit of 20 resolved tickets per domain against canonical definitions; divergence above 10% goes to the council. Cost of missing it: roughly a week of reconciliation per incident.

Shadow escalation. People DM a platform engineer instead of filing. Detect: compare intake-form volume against engineers' DMs and calendar; DMs above 20% of form volume means the tiers are being bypassed. Fix: on-call answers only form-routed tickets.

Trace. "Why does the finance revenue dashboard show $1.2M less than the Salesforce report?" Tier 0 search hits a doc on revenue-recognition timing, if that resolves it, done. Otherwise the finance champion opens fct_revenue and finds the mart excludes credit memos. If marketing also reports revenue and the two definitions conflict, it is cross-domain, so it goes to Tier 2 and then the council, which picks one definition and the champion updates the doc.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-11

Design self-service query cost and performance guardrails.

Answer

Assumptions first. One shared Snowflake account, ~200 analysts running ad-hoc SQL, dashboards and ETL on the same account, cost billed in credits. Self-service guardrails are three layers, and the enforcement point is the query engine: anything checked in a BI tool or a CLI wrapper is bypassed by the next client someone installs.

Layer 1: estimate before run. Every ad-hoc client shows what the query will touch next to the Run button. BigQuery has a real dry run that returns bytes processed for free; Snowflake has no dry run, so use EXPLAIN plus the partition-pruning plan, or run against a 1% sample and extrapolate.

Layer 2: enforce at the engine. Per-role session parameters and resource monitors, not per-user nagging.

Layer 3: isolate. Exploratory work gets its own warehouse, so a runaway there cannot queue behind the finance dashboard.

GuardrailDefault we setWhere enforced
Statement timeout900 s interactive, 3600 s scheduled (Snowflake's own default is 172800)STATEMENT_TIMEOUT_IN_SECONDS per role
Queued timeout60 s (default 0 waits forever)STATEMENT_QUEUED_TIMEOUT_IN_SECONDS
Concurrency8 per warehouse, multi-cluster max 3, STANDARD policywarehouse config
Monthly budgetnotify at 75% and 90%, suspend at 100%resource monitor
Bytes scannedwarn above 10x the user's own 30-day p95, block above 2 TBquery tag + policy check
Rows returnedalert above 10MACCOUNT_USAGE.QUERY_HISTORY monitor

Why the engine is the enforcement point. Session parameters apply to every client (the Python connector, dbt, the SQL worksheet) so a limit set on the role cannot be routed around by a clever query. Resource monitors act on compute, suspending a warehouse when credits cross a threshold. That power is also the hazard: a monitor suspend takes the whole warehouse down, so scope monitors per warehouse and never account-wide, or one runaway ad-hoc query kills the nightly ETL.

Warn versus block, decided. Block only when the estimate exceeds the hard cap, or when the query touches a partitioned table with no partition predicate. Everything else warns with a concrete alternative: a sampled query, a pre-aggregated table, or a scheduled run. A block on a deadline afternoon costs a ticket and an exception request; a warning costs nothing and the analyst usually takes the cheaper path. Track the block rate: above roughly 2% of ad-hoc queries, the cap is too tight.

Failure modes and how they show up.

  • Hidden extract: SELECT * pulled to a laptop. Detect via rows_returned in QUERY_HISTORY; alert above 10M rows. Cost is egress plus a stale copy someone builds a report on.
  • Cache masking: the 24-hour result cache makes a query look cheap in dev and expensive in prod. Detect by comparing compiled against executed plans, or disable the cache in the estimate path.
  • Bypass via a service account: if more than ~5% of queries arrive untagged, someone is running outside the tagged path. Alert on untagged query volume.
  • Monitor scope error: a suspend fires on a shared warehouse and takes dashboards down. Detect with a canary dashboard on each monitored warehouse.

The arithmetic that justifies the timeout. A Medium warehouse is 4 credits/hour, so a 30-second ad-hoc query costs 4 × 30/3600 = 0.033 credits. 200 analysts × 40 queries/day = 8,000 queries ≈ 267 credits/day. One runaway on a 6XL (512 credits/hour) for two hours burns 1,024 credits: four days of the entire team's ad-hoc budget. That is why 900 seconds, not 48 hours.

Rollout. Warn-only for two weeks, logging what would have blocked; set the cap at the 99th percentile of legitimate queries; then enable blocking for the top 1% with a self-serve override that expires in 24 hours and posts to the owner channel. On BigQuery the same shape is maximum_bytes_billed per query plus custom quotas; on Trino it is resource groups capping concurrency and queue depth with query.max-run-time bounding wall clock.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-18

How do you design the permission model for self-service analytics so that row-level, column-level, and domain-level access rules let users discover and query the data they are entitled to without over-exposing sensitive fields?

Answer

What I'd say first. Assume BigQuery or Snowflake as the warehouse, Looker or Power BI as the semantic layer, an IdP (Okta, Entra) as the source of truth for groups, and a catalog (Dataplex, OpenMetadata) for discovery. The decision that shapes everything else: enforce at the warehouse, not in the BI tool. Anything enforced only in the semantic layer is bypassed by the first person who opens a SQL console, and self-service means people will. The three layers then have three different jobs: domain controls discovery, row controls which data, column controls which fields.

Domain (discovery). IdP group maps to a domain tag. Catalog search returns only assets tagged with domains you belong to; BI workspaces and folders map to the same groups. This is UX, not security: it decides what you find, not what you can read. Access requests grant time-bound group membership (an Okta group rule with an expiry, or SCIM plus a scheduled revoke), approved by the data owner.

Row. Warehouse RLS. BigQuery:

SQL
CREATE ROW ACCESS POLICY emea_only ON analytics.orders
GRANT TO ("group:emea-sales@example.com")
FILTER USING (region = 'EMEA');

Snowflake:

SQL
CREATE ROW ACCESS POLICY emea_only AS (region VARCHAR) RETURNS BOOLEAN -> region = 'EMEA';
ALTER TABLE orders ADD ROW ACCESS POLICY emea_only ON (region);

The engine ANDs the predicate into every query: ad-hoc SQL and BI-generated SQL alike. Looker's access_filter is the same idea one layer up and is worth having because it shows the filter in the generated SQL, but it is not the enforcement point:

LOOKML
access_filter: {
  field: region
  user_attribute: region
}

Column. Policy tags (BigQuery/Dataplex) or masking policies (Snowflake) attached to the column, with a role that unmaskes:

SQL
CREATE MASKING POLICY email_mask AS (val STRING) RETURNS STRING ->
  CASE WHEN CURRENT_ROLE() IN ('PII_READER') THEN val ELSE '***' END;
ALTER TABLE users MODIFY COLUMN email SET MASKING POLICY email_mask;

Trace. An EMEA rep runs:

SQL
SELECT region, SUM(amount) FROM analytics.orders
WHERE order_date >= '2025-01-01' GROUP BY region;

The engine rewrites it to ... AND region = 'EMEA'. region is the clustering key and the partition predicate is on order_date, so partition pruning survives: bytes scanned match an unfiltered query over the same date range. Had the policy filtered on owner_email, the predicate could prune neither partitions nor clusters, so the query reads the whole date range and filters afterwards: on a 4B-row table, roughly 40 GB scanned versus 12 TB per run (illustrative figures). Put the RLS column in the partition or cluster key, or accept the scan.

Column side: SELECT email returns the masked value for a non-pii_reader. Check which value your engine evaluates predicates against. If WHERE email = 'x@y.com' filters on the masked value it returns nothing: a support ticket. If it filters on the raw value, it is an oracle that confirms an address.

Failure modes, and how you'd catch each.

  • Policy drift. A new table ships without a tag. Schedule a job joining Snowflake's ACCOUNT_USAGE.POLICY_REFERENCES to COLUMNS, or query Dataplex's catalog API for BigQuery, and alert on PII-named columns with no policy.
  • Bypass through views. A view or materialized table reading the base table may run with the definer's rights, so the base policy is not re-evaluated for its readers. Test it: query the view as a low-privilege user and assert the row count equals the filtered count.
  • Inference through joins. Masking email in table A is pointless if customer_id joins to table B where email is unmasked. Walk the lineage graph and flag any path from a masked column to an unmasked copy.
  • Aggregation leakage. RLS on rows still lets a user compute a total that is a single row. Enforce a minimum group size in the semantic layer.
  • Stale entitlements. SCIM sync from the IdP; alert on roles with zero active members, or members inactive for more than 90 days.
LayerEnforced whereMechanismBypass risk
DomainCatalog + BI workspaceIdP group → domain tagNone; discovery only
RowWarehouseRow access policy / RLS predicateViews with definer's rights
ColumnWarehousePolicy tag / masking policyUnmasked copy reachable by join

Trade-off to state out loud. Domain-level is cheap and coarse; row- and column-level are precise and cost you query performance plus a debugging surface, because the predicate a user sees in the BI tool is not the predicate the engine runs. Keep the rule set small and attribute-based, a handful of roles plus user attributes, rather than a custom role per team.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-12

Secure sharing, embedding, subscriptions, and exports.

Answer

Assume a multi-tenant BI product: dashboards and saved queries, viewers arriving through SSO with a tenant and a row-level attribute such as region. The same dashboard leaves the system four ways: an in-app share link, an embed inside the customer's own app, a scheduled email, and a CSV/PDF export. Answering for that shape of system; on a wiki or file drive, embedding and subscriptions collapse into one channel and the rest still holds.

The answer, in 90 seconds. One rule decides all four: authorization is resolved at read time, against the current viewer and the current data scope, in the path that produces the bytes. Sharing, embedding, subscriptions and exports are delivery channels over a single read, so they call the same check. Nothing ever mints a long-lived bearer of access: what leaves the server is an identity-bound expiring credential plus a content id, and the scope is looked up at render. The channels differ in exactly two ways: how long the credential lives, and whether a human is present to re-authenticate.

channelcredentialfixed at share timere-resolved at read time
share linksigned token, 5 min TTL, refreshed by the pagecontent id + tenantviewer ACL, row predicate, expiry
embedsigned JWT per page loadcontent id + tenantviewer ACL + row predicate; client-side filters are advisory only
subscriptionnone; runs as the recipientschedule + content idrecipient ACL and scope at render
exportthe viewer's own tokencontent id + filter blobsame predicate, applied inside the query

The mechanism is small enough to read:

Python
def read(dashboard_id, token, now):
    c = verify_jwt(token, key)              # signature, exp, aud
    if c["exp"] <= now: raise Expired
    acl = acl_for(dashboard_id)             # cached <=30s, versioned, invalidated on ACL write
    if acl.tenant != c["tenant"]: raise Denied
    return query(dashboard_id, predicate=scope_of(c["sub"], acl))  # identical call for CSV

Because the predicate is built per request from scope_of, revocation is bounded by credential TTL plus ACL cache TTL. With a 5-minute token and a 30-second cache, worst-case stale access is about 5.5 minutes. Ten thousand concurrent embeds refreshing every 30 seconds is roughly 330 verifications per second, so that window is a policy choice, not a performance limit, if the requirement is 60 seconds, cut the TTL to 30 s and the cache to 5 s and pay nothing measurable. That arithmetic is the trade-off: longer TTL buys fewer refreshes and a longer tail of revoked-but-working sessions.

Where it actually breaks.

Embed drift. The embed provider, not you, owns the browser session, and it is common to cache the viewer's roles in that session so tiles render without a round trip. Then an admin removes the viewer from a role, the iframe keeps serving the old scope until the session dies: eight hours if the session is a workday. Detection: join every access event against the ACL as it stood at event time; any read with no current grant is an alert. Fix: resolve per request rather than per session.

Filters in the URL. If the row predicate arrives as a query parameter, anyone can widen it. Detection: log the signed filter blob; an unsigned or mismatched blob is an alert, and a public link on a dataset with row rules should fail creation, not fail at read.

Stale subscriptions. A schedule created by a team lead that renders under their credential keeps mailing their old region to 400 recipients after they move teams. Run subscriptions as the recipient, skip recipients who no longer hold access, log the resolved scope per send, and alert when the resolved scope differs from the previous send.

Export bypass. A "download all" path that queries the raw table skips the predicate the dashboard applied. Detection: reconcile row counts and distinct scope values between the export and an authorized query; any difference is a bug, not a rounding error.

Cache bleed. A tile cache keyed only by URL serves tenant A's numbers to tenant B. Key by tenant plus a hash of the predicate, and never cache a permission-filtered, already-rendered tile across viewers.

Alternative worth naming: push the predicate into the warehouse. Row access policies of the kind Snowflake and BigQuery provide apply to every query that touches the table, including ad-hoc SQL and the export path; a BI-layer filter only binds queries that route through the BI layer. The cost is operational: the app must map its viewer to a warehouse session and you debug policies in SQL rather than in application code. Decide on one criterion, if the data is ever queried outside the BI tool, the policy belongs in the warehouse.

The test that tells you it is right: revoke a viewer's role and watch access die across all four channels within one refresh interval, including an embed that was already open. Test forwarded links, guessed ids, external viewers, permission removal mid-session, stale schedules, and hidden drill-through rows.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-17

Design export guardrails without blocking legitimate work.

Answer

First 60–120 seconds. Before designing anything I'd pin down the export surface and the data classes, because the guardrail shape depends on both. I'll assume a self-service analytics tool where analysts pull CSV/XLSX and share links, with a mix of public and PII-tagged columns.

The core idea: a guardrail is a policy function evaluated at export time, not a checklist applied to every export. Friction scales with risk, and the safe path is the default. Tag each column with a classification, then evaluate (classification, row count, recipient domain, purpose) → allow / mask / require-approval / deny. Anything inside the governed boundary auto-approves; only crossing a boundary escalates. That is what keeps legitimate work unblocked: the common case never touches a human.

SignalAuto-allowEscalate
Columnspublic/internal onlyany PII-tagged column
Rows≤ 50k> 1M
Recipientcorporate domainexternal domain
Purposedeclared, matches roleblank or "other"

Thresholds are illustrative: set them from your own export distribution, not from a blog post.

Worked trace. An analyst exports 12k rows, 3 columns, one tagged pii.email, recipient gmail.com. Policy: PII + external → require approval, and mask the email column to a salted hash in the delivered file. Approval routes to the data owner with a 4-hour SLA. Same export to a corporate address: auto-approve, email still masked. No PII, external, 12k rows: auto-approve with a per-recipient watermark. The analyst sees the outcome in the export dialog, so the rule is legible rather than a mystery block.

Friction budget. If 8% of exports escalate and each takes a 3-hour median, at 200 exports/week that's 16 approvals/week: one owner can absorb it. Tighten the thresholds until 60% escalate and the owner rubber-stamps everything. Detect that: approval latency under 60 seconds with a >95% approval rate means the gate is theatre, not control.

Failure modes and detection.

  • CSV formula injection. Cells beginning =, +, -, @, tab or CR execute when opened in Excel. Sanitize by prefixing an apostrophe; count sanitized cells per export and alert if one export sanitizes thousands: that usually means a legitimate formula column, so fix the source rather than the export.
  • Link-token leakage. Signed URLs are bearer credentials. Give them a 15-minute TTL, bind to the requesting session, single-use; detect reuse from a second IP or geography.
  • API as bypass. The governed API is itself an export path. Detect per-principal row counts against that principal's 30-day baseline and flag z-scores above ~3.
  • Approval fatigue. Covered above; it is the failure mode that quietly turns every other control off.

When to loosen. If the false-positive rate, legitimate exports blocked or delayed, exceeds ~5%, raise the row threshold or auto-approve internal recipients. Never loosen PII-to-external; that is the one boundary worth the friction. Offer a scheduled product or governed API for recurring bulk needs so the repeat case leaves the ad-hoc path entirely.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-20

Design safe natural-language self-service analytics.

Answer

What I'd say first

Clarify two things: who is asking, and what happens if the number is wrong. Assume an internal analyst-facing tool over a warehouse that already has a governed metric layer, and that a wrong answer is embarrassing but not a regulatory filing. Then the core answer: don't let the model write SQL against raw tables. Let it resolve the question to certified metrics and dimensions in a semantic layer, and let the semantic layer compile and execute the query under the caller's existing permissions. The model's output space is then bounded by the catalog, not by its imagination.

Mechanism

Two stages. Stage one is intent resolution: retrieve candidate metrics from the catalog by name, description and synonyms, and pick one. Stage two is parameter binding: map "last quarter", "EMEA", "net revenue" onto the metric's time grain, dimension values and filters. The compiled query is produced by the semantic layer (dbt MetricFlow, Cube, Looker LookML), so it can only reference certified objects. Authorization is enforced at execution, not in the prompt: row access policies and column masking in the warehouse (Snowflake row access policies, BigQuery row-level security, Postgres RLS) apply to the compiled query exactly as they do to a hand-written one. The prompt carries schema and metric metadata only, never row values, so a row containing "ignore previous instructions" is never in context.

Trade-off

Semantic layer versus raw text-to-SQL. The semantic layer gives consistent metrics and safety by construction, but coverage is capped: questions outside the model fail, and the tool must say so rather than guess. Raw SQL against a read-only role gives broader coverage, but you now own metric drift and still need row and column policies plus cost caps. Criterion: if the questions are metric-shaped and the org already governs metrics, use the layer; if you need genuine ad-hoc exploration, give a sandboxed read-only role with row policies and a hard scan cap, and label those answers exploratory rather than certified.

Failure modes and how they surface

  • Metric hallucination: the model references a metric that is not in the catalog. Detect: reject any unresolved reference before execution, log the unresolved intent, alert when the unresolved rate crosses a threshold.
  • Cost blowup: an unpartitioned scan. Detect: dry-run the query for bytes scanned (BigQuery dry run) and reject above a cap, say 10 GB; set a statement timeout around 30s and a warehouse resource monitor.
  • Row-level leak: a user sees another region's numbers. Detect: per-role canary queries in CI that assert a known out-of-scope row is absent from the result.
  • Silent wrong number: a plausible but wrong aggregation. Detect: show the interpretation and the compiled SQL, and sample-audit against a hand-checked query set.

Worked trace

"What was EMEA net revenue last quarter versus the quarter before?"

  • metric: net_revenue (certified, grain = day)
  • filters: region = EMEA
  • time: two periods, quarter grain, current and previous
  • compiled: SELECT date_trunc('quarter', day), sum(net_revenue) ... WHERE region = 'EMEA' GROUP BY 1
  • shown to the user: metric definition, filters, both periods, source table, freshness timestamp, and an edit control.

Even the best text-to-SQL systems report execution accuracy in the 60-70% range on the BIRD benchmark, so the interpretation is the product, not a detail. Human review is reserved for high-impact decisions (anything feeding a filing, a payout or a customer-facing number) not for every query.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-14

Run a duplicate metric cleanup program.

Answer

Assumptions I'd state up front: a governed semantic layer exists (dbt/MetricFlow, LookML, or equivalent), 2–3 BI tools sit on top, and warehouse query logs are retained ~90 days. Without a semantic layer the inventory is manual and the program is mostly archaeology; say so and scope accordingly.

Core answer

Don't inventory by hand. Pull definitions from wherever they're version-controlled (dbt's manifest.json, LookML, or the BI tool's content API) and join them to query logs (Snowflake ACCESS_HISTORY, BigQuery INFORMATION_SCHEMA.JOBS, Looker System Activity) for real usage. One table, every metric, with a usage count attached.

Then cluster by definition signature, not by name. Two metrics called revenue may be unrelated; ARR and annual_recurring_revenue may be byte-identical. The signature is the tuple (formula, grain, time window, filter set, population). Cluster on that tuple.

Each cluster gets one decision: converge or qualify. Converge when the difference is accidental: same intent, different SQL, usually because someone couldn't find the existing one. Qualify when the difference is real scope: daily active users for product and monthly active users for finance are different metrics and both should live, renamed so the grain is in the name.

Then migrate, don't delete. Dual-publish the canonical metric alongside the old one for a fixed window, compare, then flip consumers and set a removal date.

Why duplicates exist and persist

Metrics get defined at the point of a question, not at a governed layer. The cheapest path to answering a stakeholder is a calculated field in the BI tool, which never enters version control and never gets reviewed. Nothing breaks when a duplicate is created: the cost is deferred to whoever later compares two dashboards and finds a 12% gap. That deferral is why the pile grows quietly for years.

Inventory sources

fieldwhere it comes from
name, formula, grain, filters, populationsemantic layer manifest (dbt manifest.json, LookML)
usage count, last-queriedwarehouse query logs, 90-day window
ownersemantic layer metadata or CODEOWNERS
downstream consumerslineage (dbt, OpenLineage), column-level where available

Worked example (figures hypothetical)

412 metrics inventoried. 61 clusters of ≥2. Of those, 38 converge, 23 qualify. The largest cluster is "active user": 7 definitions, 1,240 dashboard tiles, 3 owners. Six differ only in the filter (event_count > 0 vs session_count > 0); one uses a 30-day window instead of 1 day. The six converge to one canonical definition; the 30-day one is renamed monthly_active_users and kept. Migration: dual-publish for 30 days, diff the two columns daily, flip tiles once the diff is zero for 14 consecutive days, remove the old column on a published date.

Trade-offs

Central registry vs federated ownership. Central converges fast but bottlenecks on one team; federated scales but only works if the signature standard is enforced centrally. Most orgs need federated ownership with a central standard.

Hard cutover vs shadow dual-publish. Hard cutover is cheap and breaks loudly; dual-publish costs double compute for the window and catches divergence quietly. For a metric anyone reports externally, dual-publish.

Converge vs qualify. Default to qualify when unsure. Merging two genuinely different concepts is far harder to undo than keeping two.

Failure modes

  • False merge across grain. Two metrics with the same formula but different grain get merged, and the coarser number is wrong. Detect by computing both at the coarser grain over 90 days; if they diverge, they aren't duplicates.
  • Zombie consumer. A scheduled extract or reverse-ETL job references the old metric; BI search redirects don't catch it. Detect with a lineage scan of downstream tables before removal.
  • Deprecation without a date. A deprecated flag with no removal date lives forever. Publish the date.
  • Certification inflation. Marking everything certified to end the argument. Certify only what survived the cluster decision.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-19

Design analytics content lifecycle and cleanup.

Answer

Core answer (first 90 seconds). Assume a warehouse with a BI layer (Looker, Tableau, Power BI) and a transformation layer (dbt), and that "cleanup" means shrinking the number of misleading decision surfaces without breaking the ones people depend on. The lifecycle has five states (Draft, Active, Deprecated, Archived, Retired) and every transition is driven by two measured signals: usage (distinct viewers from query logs) and freshness (age of the newest data behind the asset). Nothing moves on opinion.

Content rots by three mechanisms. Upstream drift: a column is renamed or a source table stops loading, and the dashboard keeps rendering its last successful build. Definition drift: two teams ship "active user" with different filters, so both look current and disagree. Audience drift: the team that requested the dashboard reorganizes, and the asset keeps its view count from a scheduled email rather than humans.

StateEnter whenExit to
Draftcreated, no ownerActive (owner named + certified) or Retired (30 days, no owner)
Activeowner named, freshness < 2× schedule, ≥5 distinct viewers / 90dDeprecated
Deprecated<5 viewers / 90d, OR freshness error > 7d, OR owner inactive 180dArchived (90d) or Active (owner re-claims)
Archiveddeprecated 90d, unclaimedRetired at retention expiry
Retiredretention met, impact reviewed—

Worked triage on 4,000 dashboards. Pull distinct viewers per asset over the trailing 90 days from query logs, Snowflake ACCOUNT_USAGE.QUERY_HISTORY (365-day retention) or BigQuery INFORMATION_SCHEMA.JOBS_BY_PROJECT (180 days), joined to dashboard IDs. 1,150 assets have fewer than 5 distinct viewers. Of those, 400 have an owner who responds within 14 days: 250 get fixed or transferred, 150 deprecated. The 750 orphaned assets are auto-deprecated with a banner. Ninety days later, 300 of the 900 deprecated assets are re-claimed and return to Active; 600 are archived. At the 13-month retention mark, 500 are retired and 100 kept for audit. Active surface: 4,000 → 3,400.

Trade-offs: delete vs archive vs redirect. Delete frees the name and removes the misleading surface, but breaks bookmarks and destroys audit evidence; only after retention. Archive keeps evidence, but the artifact stays discoverable and re-shareable: mitigate by removing it from the search index and revoking its schedules. Redirect preserves the link, but only when the replacement is semantically equivalent; a redirect to a "close enough" dashboard is worse than a 410 because it launders the wrong definition. Default to archive plus a redirect map, and delete only when retention allows.

Safeguards before any state change: stop the refresh schedule and outbound subscriptions first, so nobody receives a stale email; revoke sharing; post the replacement and date on the asset itself.

Failure modes and detection.

  • Silent staleness: the tile renders last-good data with no warning. Detect with a dbt source-freshness check (warn_after: 12h, error_after: 24h) and render a last_refreshed watermark on every tile; alert when age exceeds 2× the schedule interval.
  • Zombie certification: a certified badge on a stale asset. Detect by expiring certification after 180 days; the owner must re-sign.
  • Shadow copies: mass deprecation without outreach makes users rebuild the same dashboard. Detect by counting new assets sharing the source table and a similar name within 30 days; that count is the signal to slow the program down.

The program is a pipeline with thresholds, not a purge: measure, warn, give the owner a path, then deprecate, archive, and retire on evidence.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-23

Build accessibility into analytics enablement.

Answer

The 90-second answer

Scope first: "analytics enablement" here means the self-serve path. A BI tool plus the templates, semantic layer, training and support that let non-engineers answer their own questions without filing a ticket. I'd take WCAG 2.2 Level AA as the bar: it's the current W3C Recommendation (October 2023), it's what procurement questionnaires now ask for, and the European Accessibility Act obligations that started 28 June 2025 point at EN 301 549, which is where those criteria land in law.

The core answer: accessibility in analytics is not a checklist bolted onto the tool. It's a second rendering of the same data. Every chart needs a non-visual equivalent, every filter needs a keyboard path, and every workflow has to be completable without a pointer. If the equivalent view doesn't exist, no amount of ARIA on the chart fixes it.

Why analytics breaks generic guidance

Three properties. Charts are often drawn to <canvas>, which exposes no DOM: a screen reader sees an empty box. Data density is high: a 500-row grid read cell by cell is technically accessible and practically unusable. And the encoding is visual: series told apart by hue alone, thresholds by red/green.

WCAG 2.2 criterionAnalytics surfaceConcrete requirement
1.4.3 Contrast (Minimum), AAKPI tiles, axis labels4.5:1 under 18pt / 14pt bold; 3:1 at or above
1.4.11 Non-text Contrast, AAChart lines, focus rings, filter borders3:1 against adjacent colours
1.4.10 Reflow, AADashboard layoutUsable at 320 CSS px width (400% zoom at 1280) with no 2D scrolling
2.1.1 Keyboard, AFilters, drill-down, date pickersEvery action reachable and operable by keyboard
2.4.11 Focus Not Obscured (Minimum), AASticky headers, modalsFocused element not fully hidden
2.5.8 Target Size (Minimum), AALegend toggles, tooltip triggers24x24 CSS px minimum

The equivalent view is the artefact that matters:

HTML
<figure>
  <div role="img"
       aria-label="Weekly active users rose from 12,400 to 18,900 over eight weeks">
    <!-- canvas or svg chart -->
  </div>
  <details>
    <summary>Data table</summary>
    <table>…</table>
  </details>
</figure>

role="img" collapses the chart to one node with a summary; the table is the real equivalent. Labelling a canvas and stopping there is the common mistake.

Trade-offs, and what decides them

Table fallback vs. text summary vs. sonification. A table wins when exact values drive the decision and the row count is small: roughly under 50. A text summary wins for trend questions. Sonification is niche and hard to test with real users. The deciding criterion is the decision the analyst is making, not the chart type.

SVG vs. canvas. SVG gives a DOM node per element, so screen readers and automated scanners can see it; canvas stays fast past roughly 10k points. Decide by point count, and if you keep canvas, ship the table.

Live dashboards. aria-live="polite" on a KPI tile announces every refresh; on a 5-second refresh that's unusable. Use aria-live="off" plus a manual "announce" control.

Failure modes and how they're caught

  • Canvas chart with no alternative. Automated scanners only flag a missing accessible name, not missing data: catch it with a manual NVDA or VoiceOver pass on each template.
  • Focus trap in an embedded BI iframe: Tab enters and never leaves. Catch it with a keyboard-only run: Tab through the dashboard and confirm you can reach browser chrome again.
  • Colour-only series. Catch it by rendering in grayscale or a colour-blindness simulator.
  • Untagged PDF export: the screen reader reads nothing. Catch it with a PDF/UA checker on the export, not the dashboard.

So: pick the equivalent view first, map the criteria to surfaces second, then test the actual templates with a keyboard and a screen reader. A demo that passes is not the template that ships.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-24

Define self-service adoption, quality, and risk metrics.

Answer

Assumptions first. I'll assume a self-service analytics platform: a semantic layer with certified datasets, a query engine, and a mix of analyst and business users. Adoption asks whether people answer their own questions; quality asks whether the answers are right and trusted; risk asks whether self-service is exposing data or capacity it shouldn't. Every metric below needs a numerator, a denominator, and a decision it drives: otherwise it's a dashboard ornament.

Adoption. The headline is the self-service ratio: queries run by users who did not author the asset, divided by total queries, per week. Below ~40% you have a reporting team with extra steps; above ~60% self-service is real. Pair it with time-to-first-answer (median minutes from account creation to first successful query on a certified dataset; target under 30) and certified-asset reuse (share of queries hitting certified vs ad hoc tables). Promotion rate, sandbox assets promoted to certified per month, tells you whether the platform is compounding or just accumulating.

Quality. Query success rate is the base: 1 − (errored + timed-out queries / total), target >99%. But success is not correctness. Answer accuracy needs a sampled audit: pull ~50 queries a week, have a reviewer check each result against the certified metric definition, and report the pass rate. Duplicate definitions (metrics with more than one definition in the semantic layer) and stale/orphan assets (no query in 90 days, or upstream table changed) are leading indicators that the audit will fail.

Risk. Access incidents, queries returning rows outside a user's row-level-security scope, detected by diffing the audit log against the policy engine, not by waiting for a report. Export/share events to external domains. Quota friction: share of queries rejected by quota, which is a capacity signal, not a security one.

familymetricdefinitiontargetdetection
adoptionself-service rationon-author queries / total, weekly>60%query log
adoptiontime-to-first-answermedian min, signup → first certified query<30 minonboarding events
qualityquery success rate1 − (errors + timeouts) / total>99%engine logs
qualityanswer accuracyweekly 50-query audit pass rate>95%reviewer sample
qualityduplicate definitionsmetrics with >1 semantic-layer definition0catalog scan
riskaccess incidentsRLS-violating rows returned0audit log vs policy
riskexport eventsshares to external domainstrendegress log

Arithmetic: 10,000 queries/week, 3,500 from authors → self-service ratio = 6,500 / 10,000 = 65%. If 120 of those error, success = 98.8%: below target, so you page on the engine before celebrating adoption.

Trade-offs: loosening publish permissions raises adoption and duplicate definitions together; tightening RLS cuts access incidents and slows onboarding. Pick which one you're optimizing per quarter and say so.

Failure modes: (1) adoption looks healthy but reuse is flat. Users query raw tables and certified assets rot; detect via the reuse ratio, cost is duplicated logic. (2) The accuracy audit passes while freshness lags: answers are right for stale data; detect via freshness p95. (3) Quota friction spikes silently: users stop querying rather than complain; detect via a drop in weekly active self-serve users alongside rejections.

Avoid license counts, page views, and content volume: they move without anyone deciding anything.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-22

Create an evidence-driven analytics governance cycle.

Answer

Core answer (say this first). An evidence-driven governance cycle is a fixed-cadence loop with four decision points, each fed by a named signal and each ending in a decision with an owner and a rollback. Assume a mid-size company: ~2,000 tables in Snowflake, transformations in dbt, BI in Looker, a platform team of four, and a governance council of six (data platform lead, security, legal, two domain leads, analytics engineering). The cycle runs weekly triage and a monthly council; policy text is versioned in the same repo as the dbt project, so a control change is a pull request.

The loop.

  1. Instrument (continuous). Signals, not opinions: dbt test failures and source freshness, Snowflake ACCESS_HISTORY for grants that are never exercised, credits per warehouse from QUERY_HISTORY, Looker content usage, and a support queue tagged access-block. Each signal lands in one table with a timestamp.
  2. Triage (weekly, 30 min). Classify each signal as true violation, false block, or noise. False blocks get a same-week fix; true violations become a proposed control change.
  3. Decide (monthly council, 60 min). Every item arrives as a one-page change record: signal, proposed control, blast radius, test, rollback. Quorum of four; decisions recorded with a date and an owner.
  4. Roll out and verify (per change). Canary on one domain for two weeks, then measure the signal that motivated the change.

Artefact 1: the guardrail register.

GuardrailSignalThreshold (hypothetical)OwnerAction if breached
PII accessACCESS_HISTORY on tagged columns>0 non-approved roles in 7 daysSecurityRevoke grant, notify
Freshnessdbt source freshness>6h stale on tier-1Domain leadPage on-call
Costcredits per dashboard>2× 30-day medianPlatformReview, cap
CertificationLooker content with no owner>30 daysAnalytics engUnpublish

Artefact 2: worked trace of one cycle (hypothetical). Week 1: support tags 14 access-block tickets, all from the finance domain hitting a masking policy on customer_email added last month. Triage: 12 are false blocks. Finance legitimately needs the domain, not the raw address. Week 2: propose narrowing the policy to customer_email_raw and adding a finance_analyst role with a row-access policy. Blast radius: 3 dashboards, 40 users. Test: replay the last 30 days of finance queries against the new policy in a dev warehouse; expect 0 rows returned that the old policy allowed. Council approves. Week 3: canary on finance only. Week 4: measure. access-block tickets drop from 14 to 2, and no new PII access appears in ACCESS_HISTORY. Keep.

Trade-offs. Blocking controls stop leaks but generate false blocks and shadow pipelines; advisory controls (warn, log, don't block) keep velocity but lean on review. Decide by blast radius: block when the data is regulated or the action is irreversible (grant, export, delete); warn when it is reversible (naming, freshness, cost). Central policy is right for PII and retention; federate certification and naming to domains, because the platform team cannot know every table's meaning.

Failure modes and detection. Policy theater: the council meets but no change record closes. Count decisions per quarter; zero means the cycle is dead. Rubber-stamping: the canary never fails. Check whether any change was rolled back in the last two quarters. Metric gaming: teams stop filing tickets. Compare ticket volume against ACCESS_HISTORY denials. Stale certification: owners leave. Join content owners to the HR roster monthly.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-21

Define a pragmatic analytics Center of Excellence.

Answer

A pragmatic analytics CoE is a small central team, typically 3–8 people, that owns the shared analytics platform and the standards that make domain teams faster, and explicitly does not own domain metric definitions, dashboard requirements, or domain backlogs. Assumption: multiple business domains, one shared warehouse (Snowflake, BigQuery, Databricks), and more than ~20 regular analytics users. Below that, a CoE is usually overhead; embed an analytics engineer per domain instead.

The mandate has three parts. Platform and reference architecture: ingestion patterns, transformation conventions, orchestration, CI/CD, lineage, access model, cost guardrails. Standards and enablement: templates, review checklists, training, office hours, champions. Governance facilitation: risk-tiered review, PII handling, certification, audit evidence. Domains keep business meaning and product ownership: they define metrics, own dashboards, and prioritize their backlog. The CoE publishes the paved path; domains choose it because it is faster than rolling their own.

Why this split works: shared infrastructure has high duplication cost and security risk, so centralizing it removes N copies of the same ingestion job and access model. Business semantics have high context cost, so centralizing them creates a bottleneck and wrong definitions. Risk-tiered review works because most changes are low risk and can be automated; only high-risk changes need human review.

Risk tierExampleReview
LowNew internal dashboard on certified modelAutomated: CI tests, access policy, no PII
MediumNew source ingestion, new metricCoE office hours + peer review, 2 business days
HighPII, financial reporting, external dataFormal CoE + security/legal review, documented sign-off

Paved path example: a dbt project scaffold with SQLFluff linting, dbt tests for not_null/unique/relationships, a Terraform module for Snowflake roles, and a Looker template. The CoE maintains it; domain teams extend it. Service expectations: CoE review SLA 2 business days, office hours twice a week, Slack channel with 1 business day response. Support escalation: domain team → CoE office hours → platform on-call for broken shared services. Cross-domain conflicts, such as two domains wanting different definitions of “active customer,” go to a metric owner forum; the CoE facilitates but does not decide business meaning. Measure: p95 time from request to first data access, % pipelines with tests, % dashboards certified, duplicate metric count, CoE review queue wait.

Worked example (hypothetical): 12 domains, 40 pipelines. Before CoE: 6 ingestion patterns, 3 access models, p95 time to first data access 14 days, 20% pipelines with tests. After 6 months: 1 ingestion pattern, 1 access model, p95 3 days, 70% pipelines with tests, duplicate metric count down from 18 to 5. The CoE did not write domain dashboards; it removed the repeated work that made them slow.

Failure modes. Gatekeeping: CoE becomes approval bottleneck. Detect: p95 review wait > 5 business days, growing queue, teams creating personal schemas or local CSV extracts. Ivory tower: standards ignore domain reality. Detect: template adoption < 30% of new pipelines, repeated exceptions, champions stop attending. Shadow IT: domains bypass governance. Detect: number of unmanaged service accounts, data extracts to local storage, untracked dashboards in BI tool. Fix: move low-risk changes to automated path, rotate CoE engineers into domains, publish exception process with expiry.

Trade-offs. Centralize when the asset is shared, expensive to duplicate, or security-sensitive. Distribute when the asset needs business context or fast iteration. Do not create a CoE if you have one domain, fewer than ~20 analytics users, or no shared platform: a guild or embedded model is cheaper. Alternatives: federated guild with a platform team, embedded analytics engineers with a lightweight standards group, or a platform team only if governance is already handled by security.

The CoE evolves: start with platform and paved path, add governance as risk grows, and hand back domain ownership as maturity increases.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-25

Review a self-service analytics program end to end.

Answer

The 90-second answer

A self-service analytics program is a control system, not a catalog. Review it by asking one question: can a non-analyst get a correct answer to a new question without asking permission, and can you prove the answer was correct? The semantic layer, the certification badges, the sandbox: all of it exists to make that true or to bound the damage when it isn't.

Assume a Snowflake or BigQuery warehouse, dbt for transformation, Looker or Tableau for BI, a program live more than a year, and access to query history plus BI usage logs. If you don't have those two logs, that's finding number one: you cannot review what you cannot measure.

Then walk four gates, and at each one name the signal that says it works and the signal that says it's broken.

Gate 1: discovery and definition. The failure is two dashboards, two numbers, both defensible. Detect it by pulling the BI API's content list and grouping by underlying table plus measure expression; anything with the same grain and different SQL is a duplicate. The fix is a semantic layer (dbt metrics or LookML measures) so the definition lives in one place.

Gate 2: analysis and validation. Sandbox is where exploration happens; promotion to production goes through CI running dbt test (unique, not_null, relationships, accepted_values) plus source freshness with warn_after/error_after. Certification is a human sign-off on top, and it should stay rare, if 80% of content is certified, the badge means nothing.

Gate 3: sharing and cost. Row-level security in the semantic layer (access_grant and sql_always_where in Looker, row access policies in Snowflake), export controls on the BI tool, and a hard cost ceiling: maximum_bytes_billed per query on BigQuery, a resource monitor that suspends the warehouse at a credit threshold on Snowflake.

Gate 4: operations. Every certified asset needs a named owner and a review date. Detect orphans by joining the BI content list against the identity provider's active users; anything owned by a deactivated account is unowned.

Cost arithmetic (illustrative). A dashboard scanning 2 TB per refresh, refreshed by 40 users 20 times a day, on BigQuery on-demand at $6.25/TiB: 800 runs × 2 TB × $6.25 = $10,000/day. Materialize it once an hour instead: 24 × 2 TB × $6.25 = $300/day. That is the difference between a cost problem and a rounding error, and you find it by sorting INFORMATION_SCHEMA.JOBS_BY_PROJECT by bytes billed, not by asking people to be careful.

Failure modes and how you catch them

FailureDetectionBlast radius
Surprising datarow-count test deviating >3σ from trailing 7-day meanevery downstream dashboard
Stale sourcemax(loaded_at) lag past error_afterdecisions on old numbers
Permission changediff GRANTS_TO_ROLES against baseline at access reviewdata exposure
Expensive querytop-N by bytes in query history; resource monitor tripbudget
External shareshare/egress audit logcontractual
Owner departureBI content owner absent from active IdP usersrot
Duplicate metricsame grain, different SQL in BI content listtrust
AI-generated queryruns green, no test coverage, no ownersilent wrong answers

The trade-off you actually have to decide. Governance and enablement pull against each other, and the review's job is to say where the line sits. Gate certification on anything feeding an external report or a financial number; leave the rest open in the sandbox with cost caps and freshness alerts. Gate everything and analysts route around you into spreadsheets: the worst outcome, because then nothing is observable at all.

Curated: · Written: · Reviewed:

Difficulty: Hard