What makes a
good data platform?
Teams can build on each other’s models and safely bring shared and external data into products. Each contribution makes the next easier, so the value compounds.
Imagine opening your yearly grocery recap: favourite purchases, where they came from, how they travelled and their nutrition. How does a platform make that possible?
This fictional story follows one idea from exploration to a product. The five sketches carry the story; code and engineering notes expand in place.
The data is already there.
Purchases, product details, supplier records and delivery events already flow into the platform. External sources arrive through feeds and APIs. Each source has an owner.
Checkout records sales. Catalogue teams maintain products and nutrition. Suppliers publish origins. Logistics records journeys. Their daily work becomes a shared foundation for new ideas.

“What could my grocery year tell me?”
A product manager opens an approved view of his own purchases with an agent. They use SQL, the language for asking questions of tables.
What did I buy most? Where did it come from? How did it travel to me? How much fibre did I buy?

Some results feel useful enough to share. Could the same questions become a yearly recap for every shopper?
Start with the data he is allowed to use.
His project names its purpose and requested datasets. Approved Entra-group membership gives him access to a view prepared for his own purchase history.
An Entra group is a shared permission list. Unity Catalog enforces access to tables and views in Databricks.
The view and service enforce shopper scope. The agent helps write SQL within its approved tools and permissions.
Engineering notes · Access approvals, identities and Terraform grants
Finding a table is different from being allowed to read it.
Unity Catalog is the data directory and permission system. published.retail.my_purchase_items identifies a catalog, schema and table.
Reading requires USE CATALOG, USE SCHEMA and table SELECT. Container access alone does not allow row reads.
Both public and non-public data are explorable. The manager gets approved group access to a view of his own purchases, alongside permitted reference data.
The view and service enforce shopper scope. Writing a shopper filter in SQL is not the access boundary. The agent uses only its approved tools and identity.
A pull request approves the offered access. Access management approves who receives it, for what purpose and duration.
A person needs data
- Request the relevant access group through access management, with a business purpose.
- The responsible approver reviews the request and any required data-owner or compliance approval.
- Approved membership is provisioned into the group used by Databricks.
- The person inherits that group’s Unity Catalog grants. Review or remove membership when the need ends.
A job or service needs data
- Use a dedicated service principal or a supported, provisioned managed identity.
- Declare its required permissions in YAML and review them through a pull request.
- Terraform/OpenTofu manages grants for the registered service identity directly or for its approved account group. The relevant identity-management process provisions group membership.
- The job runs as that identity, with only the privileges its work requires.
See YAML become Terraform-managed Unity Catalog grants
The Databricks databricks_grants resource turns the project’s approved access into Terraform-managed permissions.
Illustrative extension for one requested table. A full module handles every table and supplies authentication, existing resources and group provisioning.
# consumers/analytics-projects/grocery_discovery.yaml — excerpt
access_group: team-grocery-discovery
table_access:
- name: published.retail.my_purchase_items# access.tf — simplified platform module
locals {
project = yamldecode(file("${path.module}/../consumers/analytics-projects/grocery_discovery.yaml"))
# Show one requested table; a full module handles every table_access entry.
access = {
catalog = "published"
schema = "retail"
table = "my_purchase_items"
readers_group = local.project.access_group
}
}
resource "databricks_grants" "catalog" {
catalog = local.access.catalog
grant {
principal = local.access.readers_group
privileges = ["USE_CATALOG"]
}
}
resource "databricks_grants" "schema" {
schema = "${local.access.catalog}.${local.access.schema}"
grant {
principal = local.access.readers_group
privileges = ["USE_SCHEMA"]
}
}
resource "databricks_grants" "table" {
table = "${local.access.catalog}.${local.access.schema}.${local.access.table}"
grant {
principal = local.access.readers_group
privileges = ["SELECT"]
}
}USE_CATALOG and USE_SCHEMA allow container use; SELECT permits reads. Approved group members inherit these grants.
databricks_grants manages an object’s full grant set. Collect all intended principals in one place; competing resources or manual edits can overwrite permissions.
A direct service-principal grant uses its registered application identifier. A group grant uses the account-group name. Both follow the reviewed infrastructure process.
A service principal identifies software. An Azure managed identity avoids an application-managed password. Both still need provisioning and permissions; a storage connector’s identity is separate from a job runner.
Verify workspace, compute, storage and destination permissions too. An export needs source-read and destination-write access. Revocation must account for other groups and direct grants.

Make each statistic mean what it says.
A fun statistic can still be wrong. Duplicate receipt lines inflate counts; ambiguous origin joins multiply rows; missing journeys can make a route look shorter.
Keep definitions and limitations beside the data. A receipt line, a product and a delivery batch describe different things; their identifiers must connect correctly.
Define the contract. Test the model.
A data contract is the producer’s promise about meaning, structure and changes. Agree purchase-line identifiers, return rules, product versions, batch links and nutrition units across the owning teams.
See the purchase-data contract
Illustrative schema. A declared check needs a validator or runtime implementation. Personal records remain subject to approved scope.
# contracts/purchase_items.yaml — illustrative
name: purchase_items
owner: checkout-team
grain: one retained purchase line after agreed return adjustments
columns:
- name: purchase_item_id
type: string
checks: [not_null, unique]
- name: shopper_id
type: string
personal_data: true
- name: purchased_at
type: timestamp
meaning: Purchase time in UTC
- name: product_id
type: string
- name: batch_id
type: string
nullable: true
- name: quantity
type: bigint
meaning: Net purchased units under the agreed return rulesNutrition models convert label values per 100 grams using purchased weights and product versions. Unknown weights remain unknown.
These figures describe purchased food, not what someone actually ate.
A SQL model is a saved transformation that others can reuse. Tools such as dbt build its result as a table or view.
See SQL build on an existing model
Grocery teaching extensions, not implemented files in the public example repository. Upstream models reconcile returns and provide historically correct, unique batch-origin records.
-- models/purchase_origins.sql — illustrative
-- batch_origins must be unique on (product_id, batch_id).
select
p.purchase_item_id,
p.shopper_id,
p.purchased_at,
p.quantity,
o.origin_country
from {{ ref('purchase_items') }} p
left join {{ ref('batch_origins') }} o
on p.product_id = o.product_id
and p.batch_id = o.batch_idThe left join retains purchases without an origin match. Validate the origin key before joining; multiple matches would duplicate a purchase.
-- models/yearly_recap.sql — illustrative origin summary
-- This teaching example uses UTC calendar years.
select
shopper_id,
year(purchased_at) as recap_year,
coalesce(origin_country, 'Unknown') as origin,
sum(quantity) as purchased_units
from {{ ref('purchase_origins') }}
where quantity > 0
group by shopper_id, year(purchased_at),
coalesce(origin_country, 'Unknown')# models/purchase_origins.yml — illustrative
version: 2
models:
- name: purchase_origins
description: One purchase line with its recorded batch origin, if known
columns:
- name: purchase_item_id
data_tests: [not_null, unique]
- name: shopper_id
data_tests: [not_null]
- name: quantity
data_tests: [not_null]The recap reads the earlier model. Unknown origins remain in its totals, so the feature can show coverage honestly.
Example years use UTC. The product must define calendar boundaries and return adjustments. Production processing has separately reviewed permissions from the personal exploration view.
Review SQL alongside YAML. Producer contracts describe the promise; dbt contracts enforce configured columns and types; data tests check selected quality conditions.

The product manager can now combine trusted building blocks. The supplier team’s origin rules and the catalogue team’s nutrition definitions become useful beyond their original systems.
When a team improves its model, dependent products can benefit through the agreed contract. Shared definitions make that reuse dependable.
Give the team a supported way to ship it.
The team declares inputs, outputs, access and jobs in configuration. A supported workflow builds the agreed infrastructure bundle around its product code.
YAML describes the setup. Terraform or OpenTofu builds the resources and grants. GitHub Actions runs checks and deployment through pull-request and environment approvals.
A deployer identity creates resources; a runner identity executes jobs and reads data. Their permissions are separate.
Supported workflows deliberately limit choices. When the same need appears repeatedly, the platform team adds another configuration-based workflow.
Engineering notes · Configuration, infrastructure bundles and deployment examples
Build supported workflows from repeated needs.
Supported workflows made this foundation possible before the experiment began. Teams declare their feeds; the platform builds storage, jobs, identities and permissions.
Configuration defines infrastructure, access, jobs, runtime locations and code deployment. Teams supply their business logic; the platform automates the surrounding setup.
Supported choices are deliberately limited. The platform team maintains the building blocks; teams own their source data and product logic.
When the same need appears repeatedly, turn it into another supported workflow. Handle unusual requests through a supported extension or an explicitly owned exception.
Reference · Who owns each part?
Own the source and its promise.
- Maintain the source system, event feed or agreed file delivery.
- Define identifiers, timestamps, schema, meaning and expected freshness.
- Classify the data, name its owner, and agree access and breaking changes.
Own the shared delivery machinery.
- Build and maintain configuration-based supported workflows for recurring needs.
- Generate team infrastructure bundles, jobs, identities and grants from reviewed configuration.
- Operate shared services, monitoring, checkpoints and recovery mechanisms.
Own what is built from the data.
- Declare the input data, purpose and required access.
- Own product code, transformations and tests; configure where and how jobs run.
- Own the output’s meaning, service expectations and downstream delivery.
Publish beyond Databricks, and build on the platform.
The recap will eventually leave Databricks for the grocery app. Its supported publication path declares the destination, access and delivery expectations.
Teams receive two software identities: a deployer to create or update resources, and a runner to execute jobs and access data.
Within those permissions, teams manage their own infrastructure, configuration and code for dashboards, data science, MLflow models, jobs and other supported resources.
External data needs an internal owner. That team owns permitted use, mapping, freshness and the response to provider changes.
YAML describes it. Terraform or OpenTofu builds it.
YAML is the order form. It declares the desired setup in readable text, kept in GitHub alongside the code.
Terraform or OpenTofu builds the infrastructure. Platform modules translate YAML into resources, jobs and Unity Catalog grants. Python and SQL implement processing and models.
GitHub Actions runs the delivery. A plan previews changes; an apply carries them out after review and approval.
The product manager’s discovery project declares a purpose and requested datasets. Its purchase view is restricted to his own records.
See an exploration access request
Fictional grocery adaptation of the public configuration patterns. The platform must implement the view’s shopper scope.
# consumers/analytics-projects/grocery_discovery.yaml — illustrative
config_schema: analytics-project-v1
name: grocery_discovery
access_group: team-grocery-discovery
governance_metadata:
governance.purpose: |
Explore my own purchase history with approved product,
origin, delivery and nutrition data to prototype a grocery recap.
table_access:
- name: published.retail.my_purchase_items
- name: published.catalog.products
- name: published.supply.batch_origins
- name: published.logistics.batch_journeys
- name: published.catalog.product_nutritiontable_access names the datasets; access_group receives the approved grants. Human membership is approved separately through access management.
Make the first working setup quick.
A setup command can prepare shared state storage and deployment identities once. Teams then reuse that foundation. The public example repository does not include this optional tooling.
New ingestion flow
Declare the source, owner and delivery requirements. Deployment creates the connector or landing location, publication resources and permissions.
New data product
Declare the team and inputs. Receive storage, a schema and deployer/runner identities. Deploy team-owned jobs, dashboards, models and supported outputs.
- Choose a supported workflowFill in YAML for the source integration or data product, including ownership, job location and product-code settings.
- Validate and planGitHub Actions checks the configuration and produces the Terraform/OpenTofu plan.
- Review and approveReview the resource changes. Obtain the required source-owner, platform and data-access approvals.
- Provision and deployApply the approved infrastructure. For a data product, deploy the team’s job code through its own workflow.
- Run and verifyCheck the capture or transformation run, output, access and freshness. A green deployment is only the setup step.
Build the foundation once. Existing purchase and supplier feeds serve many products. The recap reuses them; a new source follows the same reviewed onboarding workflow.
Compare a source declaration with a recap export
Fictional adaptations of the public repository’s ingestion and export patterns. Ownership, validation and deployment must be implemented.
# producers/retail/purchases.yaml — illustrative
config_schema: ingestion-v1
producer_info:
team: Checkout
access_control:
contains_personal_data: true
producer_approval_required: true
integrations:
- name: purchase_items
type: scheduled
data_domain: retail
public_for_everyone: false
source:
account_name: grocerydata
storage_name: purchases
path: purchase-items/
file_format: PARQUETRaw purchase history is restricted. A separately governed view supports the product manager’s own-data exploration.
# consumers/data-exports/grocery_recap.yaml — illustrative
config_schema: data-export-v1
name: grocery_recap_export
access_group: grocery-recap-service
exports:
- type: sql_server
sql_server:
destination:
server_name: sql-grocery-app.example.com
database_name: grocery_app
database_writer_group_name: recap-writers
table_mappings:
- source_full_name: data_products.grocery.yearly_recap
destination_name: "[dbo].[grocery_recap]"
trigger:
type: schedule
schedule:
cron: "0 2 * * *"The export defines delivery to the application. The application still enforces which shopper can receive each recap.
See the GitHub Actions workflow shape
Illustrative workflow. Installation, federated authentication, provider versions and remote state are assumed configured. The repository-owned validation script checks configuration and creates the pull-request plan.
# .github/workflows/platform.yml — illustrative workflow
name: Validate and deploy platform
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: ./scripts/validate-platform
deploy:
if: github.event_name == 'push'
needs: validate
runs-on: ubuntu-latest
environment: production
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
# Authenticate using a configured federated identity.
- name: Plan and apply merged infrastructure
working-directory: infrastructure
run: |
tofu init -input=false
tofu validate
tofu plan -input=false -out=deployment.tfplan
tofu apply -input=false deployment.tfplanPull requests validate and preview changes. After merge, the protected production job creates and applies a fresh plan for that revision.
Configure GitHub environment protection and federated identity separately. A saved plan depends on its configuration and state; do not blindly reuse an older pull-request plan.
Keep infrastructure state in a shared, access-controlled backend with locking. Pin engine and provider versions. Terraform uses the same plan/apply structure as the OpenTofu example.
Technology reference · Base services and their roles
| Service | In everyday language | Concrete job |
|---|---|---|
| Setup tooling | The setup assistant | Automate initial state-storage and deployment-identity setup before teams use the supported workflows. |
| Terraform / OpenTofu | The infrastructure builder | Read YAML through platform modules, plan changes, and manage resources and Unity Catalog grants through providers. |
| Object storage | The storeroom | Keep source files and replay inputs within agreed retention rules. |
| Databricks jobs | The workers and their timetable | Run ingestion, transformations, checks, and exports using dedicated identities. |
| Unity Catalog | The data directory and permission desk | Organise named datasets and enforce privileges for users, groups, and service principals. |
| dbt | The preparation instructions | Use SQL models to turn source data into useful tables; define documentation and tests alongside them. |
| GitHub Actions | The delivery line | Orchestrate checks, approvals, and Terraform/OpenTofu plan/apply runs. |
| Access management | The membership desk | Handle human requests, approvals, membership, and removal from access groups. |
Now the useful queries become a feature.
The app can show favourite purchases, recorded origins, known journey legs and nutrition summaries. Every claim links back to the data that supports it.

Publishing to all shoppers needs separate product approval. The application returns only the authenticated shopper’s recap, including unknowns, coverage and update time.
A playful query session became a product because many teams had already made their part of the data useful. That is how the value compounds.
A useful recap stays explainable and correctable.
A late return or corrected origin changes the result. Rebuild affected models, check totals and publish the correction with an update time.
Track missing origins, available journey legs, freshness and cost. Each source has an owner who can explain changes and help recover failures.
People and agents investigate together in Slack. They cite checked evidence and propose fixes through review; a failure alert grants no additional permissions.
Engineering notes · Recovery, service measures and agent operations
The arrows need more than a direction.
What if a purchase arrives twice, a return arrives late, or a supplier corrects an origin? Define updates and rebuild the affected recaps.
Reference · Delivery modes
| Mode | What moves | Question to settle |
|---|---|---|
| Streaming | Events processed as they arrive | How do late and duplicate events behave? |
| Scheduled batch | A bounded set on a schedule | What window is covered if a run is missed? |
| Incremental | Changes after recorded progress | When is the checkpoint safe to advance? |
| Full refresh | A rebuilt result | How does the replacement become visible safely? |
| Backfill | A selected historical range | Can it run without duplicating or disrupting current data? |
| Declared export | An approved output to a named destination | Who owns delivery, retention, and downstream use? |
Retain inputs for the agreed recovery window. Record progress and make retries avoid duplicate changes. State where privacy, deletion or source retention limits replay.
If an origin was wrong, correct it and rebuild dependent summaries. Check totals and coverage before publishing the updated recap.
Reference · Recovery flow
Measure the promises people depend on.
Can the recap explain its coverage? Measure missing origin links, available journey legs, data freshness and the cost of producing each shopper’s result.
Set targets from the use case. A daily report and an interactive feature need different delivery guarantees.
Retire unused datasets and duplicate paths. Keep dependencies clear and ownership current as people change teams.
Give agents useful tools and people clear ownership.
The manager’s SQL helper and operational support agents use the same governed foundation. If recap jobs fail, people and agents investigate in Slack.
The harness is the agent’s toolbox and operating setup: instructions, context, tools, identity and limits.
For a failed job, check existing investigations, inspect permitted evidence and explain the likely cause. A proposed fix follows the normal pull-request review process.
Alerts grant no extra permissions. Agents should cite evidence, ask when facts are missing, and stand back when a person takes over.
Reference · How agent investigations run
A question or a failed job.
Slack delivers an eligible message. A lightweight router decides whether to answer, ask a question, investigate, or stay silent.
Find evidence with scoped tools.
Read shared knowledge and approved system evidence. A specialist agent can continue the investigation with its own tools and permissions.
An explanation or proposed fix.
Reply in the thread with evidence and limits. Review a proposed change through the normal pull-request and deployment process.
Technical detail · Deploy and operate the agent harness
Package the harness in a container. GitHub Actions deploys it to Kubernetes; Terraform manages supporting resources and grants.
Use separate test/production configuration, workload identity and secret references.
An authenticated interface, such as Model Context Protocol, connects Slack to a specialist agent. The specialist retains its own permissions.
Example · Describe the harness and its boundaries
Illustrative design YAML, not a configuration schema implemented by the public example repository. The deployment and identity system must enforce these choices.
agent:
purpose: explain failed data deliveries and propose repairs
inputs:
- approved Slack support channels
- approved failure notifications
evidence:
- versioned runbooks and source repositories
- job status and logs allowed by the workload identity
outputs:
- an evidence-backed reply in the original thread
- a fix pull request where repository write access is approved
change_path: pull request, review, deployment approval
runtime:
package: versioned container image
environments: [test, production]
identity: workload identity
credentials: secret references
limits: bounded context, tool calls and execution time
Monitor tool failures, queue time and answer quality. Test real investigations, recovery notices, duplicates and human takeover. A healthy container does not prove useful support.
Full overview · Sources, platform and products
Product teams
Each team owns its source system and what its data means.
Public & external sources
Public registers, partner systems, and external services.
- 01 · CAPTURE
Ingestion
Connect to a feed, read files, or fetch pages from an API.
- 02 · RETAIN
Storage
Keep the inputs and progress needed for reliable processing and recovery.
- 03 · PUBLISH
Trusted datasets
Validate, describe and publish tables with controlled access.
Discovery
Explore public and non-public data with SQL. Non-public data needs approved, purpose-based access through an Entra group. Agents can help write queries.
Model
Build SQL models, forecasts, or machine learning models.
Product
Publish data beyond Databricks through supported delivery paths. Build team-owned jobs, dashboards and models with dedicated deployer and runner identities.
Try it with one real consumer.
Walk one recap from its source records to the shopper:
- Useful: Can the shopper understand the result and its coverage?
- Owned: Does each input have an owner, a definition and a change policy?
- Controlled: Are human access, workload permissions and shopper authorization explicit?
- Repeatable: Can reviewed configuration and code reproduce the deployed product?
- Recoverable: Can a correction rebuild affected results without duplicating purchases?
- Operable: Can people explain freshness, quality, failures and cost?