{#- Context variables:
   - catalog: str (e.g., "acme_fsi_demo")
   - industry: str (e.g., "fsi")
-#}
# DLT Pipelines — Local Context

## Table Naming Convention
- Pattern: {tier}_{entity} where {entity} is IDENTICAL across all tiers
- If bronze is bronze_portfolio_positions, silver MUST be silver_portfolio_positions
- Mismatches break STREAM() references

## Table Name Resolution
- Single-schema pipeline: use LIVE.table_name (resolves via catalog + target)
- Multi-schema pipeline: use fully qualified {{ catalog }}.schema.table_name

## Tier Rules
- Bronze: STREAMING TABLE + read_files from Volumes
- Silver: STREAMING TABLE + STREAM(LIVE.bronze_xxx) + quality CONSTRAINTS
- Gold: LIVE TABLE (DLT handles incrementalization automatically)
  - NEVER use STREAMING TABLE for gold (append-only)

## Pipeline YAML (UC requirement)
- MUST have both catalog: AND target: fields
- target = default schema (value set after planning via variable)

## Common Mistakes
- .example files in bronze/, silver/, gold/ break the glob include
- Omitting target: in pipeline YAML causes deploy failure
- Using STREAMING TABLE for gold aggregations
- Inconsistent entity names across tiers
