This lesson teaches you how to organise your Databricks workspace so multiple teams (data engineers, data scientists, analysts, downstream consumers) can collaborate safely. By the end, you'll be able to design a catalog structure, assign permissions, and explain data lineage through your weather-to-power pipeline.
Unity Catalog introduces a three-level naming convention for all data objects:[1]
catalog.schema.table
-- Examples in your domain:
prod.bronze.weather_raw
prod.silver.weather_ts
prod.silver.dim_assets
prod.gold.forecast_ts
dev.silver.weather_ts -- dev environment copy
| Catalog | Purpose | Who Writes | Who Reads |
|---|---|---|---|
prod |
Production pipeline tables (Bronze/Silver/Gold) | Service principals (pipeline jobs) | Everyone (read-only for humans) |
dev |
Development/staging — mirrors prod structure | Data engineers | Data engineers, data scientists |
sandbox |
Exploration — analysts create personal schemas | Analysts, data scientists | Owner only (or shared explicitly) |
No human writes directly to prod. Only service principals (attached to Workflow jobs) have write access. This prevents accidental corruption and ensures all prod data is traceable to a pipeline run. Humans read prod, experiment in sandbox, and promote changes through dev.
Unity Catalog uses a hierarchical permission model. Grants cascade downward (catalog → schema → table). Deny at any level blocks access.[2]
-- Grant patterns for your team
-- 1. Pipeline service principal: full access to prod
GRANT USE CATALOG ON CATALOG prod TO `pipeline-service-principal`;
GRANT USE SCHEMA ON SCHEMA prod.bronze TO `pipeline-service-principal`;
GRANT USE SCHEMA ON SCHEMA prod.silver TO `pipeline-service-principal`;
GRANT USE SCHEMA ON SCHEMA prod.gold TO `pipeline-service-principal`;
GRANT ALL PRIVILEGES ON SCHEMA prod.bronze TO `pipeline-service-principal`;
GRANT ALL PRIVILEGES ON SCHEMA prod.silver TO `pipeline-service-principal`;
GRANT ALL PRIVILEGES ON SCHEMA prod.gold TO `pipeline-service-principal`;
-- 2. Data scientists: read prod, write dev + sandbox
GRANT USE CATALOG ON CATALOG prod TO `data-scientists`;
GRANT SELECT ON SCHEMA prod.silver TO `data-scientists`;
GRANT SELECT ON SCHEMA prod.gold TO `data-scientists`;
GRANT ALL PRIVILEGES ON CATALOG dev TO `data-scientists`;
GRANT ALL PRIVILEGES ON CATALOG sandbox TO `data-scientists`;
-- 3. Analysts: read prod gold + silver, write sandbox
GRANT USE CATALOG ON CATALOG prod TO `analysts`;
GRANT SELECT ON SCHEMA prod.silver TO `analysts`;
GRANT SELECT ON SCHEMA prod.gold TO `analysts`;
GRANT ALL PRIVILEGES ON CATALOG sandbox TO `analysts`;
-- 4. Downstream systems: read gold only
GRANT USE CATALOG ON CATALOG prod TO `trading-system`;
GRANT USE SCHEMA ON SCHEMA prod.gold TO `trading-system`;
GRANT SELECT ON SCHEMA prod.gold TO `trading-system`;
| Identity Type | Use For | Example |
|---|---|---|
| Service principal | Automated pipelines, external system access | sp-weather-pipeline, sp-trading-reader |
| Group | Team-level permissions (easier to manage) | data-engineers, data-scientists, analysts |
| User account | Interactive work (notebooks, SQL editor) | Individual team members |
Unity Catalog automatically tracks lineage — which tables read from which, and which jobs produced which outputs.[3]
Lineage answers critical questions for your team:
prod.bronze.weather_raw
prod.silver.weather_ts
dev.bronze.weather_raw
dev.silver.weather_ts
Pro: Clear separation. One GRANT gives full dev access. Prod is locked down by default.
Con: Queries must change catalog name between environments (mitigated by parameterisation).
weather.bronze.raw_forecasts
weather.silver.asset_ts
power.gold.forecasts
Pro: Natural for very large orgs with many domains.
Con: Environment separation requires per-schema grants. More complex for a single-team product.
Use environment-based catalogs (prod/dev/sandbox). Your domain is coherent (weather-to-power is one product), and environment separation is the primary governance need. Within each catalog, use schemas for medallion layers (bronze/silver/gold). This keeps permissions simple and pipeline promotion predictable.
Your asset registry (parks, turbines, locations) is master data — it changes rarely but has outsized impact when it does. Unity Catalog helps manage this:
-- Table comment documents ownership and update process
COMMENT ON TABLE prod.silver.dim_assets IS
'Asset master data. Source of truth for all geo-locations and hierarchy.
Owner: data-engineering team.
Update process: PR-reviewed changes via dev.silver.dim_assets → promotion job.
Breaking changes require downstream notification.';
-- Column comments for discoverability
COMMENT ON COLUMN prod.silver.dim_assets.parent_asset_id IS
'FK to parent asset (park). NULL if this row IS a park.';
COMMENT ON COLUMN prod.silver.dim_assets.hub_height_m IS
'Turbine hub height in metres. Used for wind speed extrapolation. NULL for parks.';
dev.silver.dim_assets (engineers have write access)prod.silver.dim_assets (using MERGE)Unity Catalog supports tags for discoverability and governance policies:
-- Tag tables by data classification
ALTER TABLE prod.silver.weather_ts SET TAGS ('pii' = 'none', 'retention' = '2years');
ALTER TABLE prod.gold.forecast_ts SET TAGS ('pii' = 'none', 'sla' = 'hourly');
ALTER TABLE prod.silver.dim_assets SET TAGS ('data_class' = 'master_data');
-- Tag columns (useful for sensitive location data if needed)
ALTER TABLE prod.silver.dim_assets ALTER COLUMN latitude SET TAGS ('geo' = 'true');
ALTER TABLE prod.silver.dim_assets ALTER COLUMN longitude SET TAGS ('geo' = 'true');
A data scientist wants to experiment with a new feature for the ML model. Where should they create tables?
The trading system needs to read power forecasts but nothing else. What's the minimal permission set?
Your pipeline writes to prod.silver.weather_ts. What should own the write permission?
📖 Recommended Reading
Unity Catalog best practices — Databricks Documentation. Covers catalog organisation, permission patterns, and migration strategies. Also see Privilege types for the full permission reference.
With governance in place, the next lesson covers Feature Engineering & the Feature Store — how to transform Silver time series into ML-ready features, manage feature tables, and enable reproducible model training.
Questions about catalog structure, permission inheritance, or managing cross-team access? Ask your teacher.
Rechtliches: Impressum