unity-catalog-constraints

Installation
SKILL.md

Unity Catalog Primary Key and Foreign Key Constraints

Overview

Unity Catalog supports informational constraints (NOT ENFORCED) that enrich metadata, improve query optimization, and enable BI tool relationship discovery. This skill standardizes PK/FK implementation for star schema dimensional models following Kimball dimensional modeling best practices.

Core Principle: Surrogate keys are PRIMARY KEYS. Facts reference surrogate PKs via FOREIGN KEY constraints. Business keys have UNIQUE constraints for alternate lookups.

When to Use This Skill

Use this skill when:

  • Creating Gold layer tables with star schema dimensional models
  • Implementing PRIMARY KEY and FOREIGN KEY constraints in Unity Catalog
  • Setting up SCD Type 1 or Type 2 dimension tables
  • Creating fact tables that reference dimension tables
  • Troubleshooting constraint application errors
  • Preventing common production deployment failures

Critical Rules

Installs
1
GitHub Stars
2
First Seen
Mar 8, 2026
unity-catalog-constraints — databricks-solutions/vibe-coding-workshop-template