Observability Setup Orchestrator
End-to-end workflow for setting up Databricks observability — Lakehouse Monitoring, Anomaly Detection, AI/BI Dashboards, and SQL Alerts — on top of a completed Gold layer and semantic layer.
Predecessor: semantic-layer-setup skill (Semantic layer should be complete, but Gold tables are the minimum requirement)
Time Estimate: 3-5 hours for initial setup, 30 min per additional table/dashboard
What You'll Create:
- Lakehouse Monitors — data quality, drift, and custom business KPIs for Gold tables
- Anomaly Detection — schema-level freshness and completeness monitoring via the Data Quality API
- AI/BI Dashboards — Lakeview dashboards with monitoring widgets and business metrics
- SQL Alerts — config-driven alerting with severity-based routing
Decision Tree
| Question |
Action |
| Setting up observability end-to-end? |
Use this skill — it orchestrates everything |
| Only need Lakehouse Monitoring? |
Read monitoring/01-lakehouse-monitoring-comprehensive/SKILL.md directly |
| Only need Anomaly Detection? |
Read monitoring/04-anomaly-detection/SKILL.md directly |
| Only need AI/BI Dashboards? |
Read monitoring/02-databricks-aibi-dashboards/SKILL.md directly. Still load common skills first: databricks-expert-agent, naming-tagging-standards |
| Only need SQL Alerts? |
Read monitoring/03-sql-alerting-patterns/SKILL.md directly |
Mandatory Skill Dependencies
CRITICAL: Before generating ANY code for observability, you MUST read and follow the patterns in these common skills. Do NOT generate these patterns from memory.
| Phase |
MUST Read Skill (use Read tool on SKILL.md) |
What It Provides |
| All phases |
skills/databricks-expert-agent |
Core extraction principle: extract names from source, never hardcode |
| Monitor scripts |
common/databricks-python-imports |
Pure Python module patterns for helpers |
| Job deployment |
skills/databricks-asset-bundles |
Job YAML, deployment patterns |
| Troubleshooting |
common/databricks-autonomous-operations |
Deploy → Poll → Diagnose → Fix → Redeploy loop when jobs fail |
Monitoring-Domain Dependencies
| Skill |
Requirement |
What It Provides |
monitoring/01-lakehouse-monitoring-comprehensive |
MUST read at Phase 1 |
Monitor setup, custom metrics, graceful degradation |
monitoring/04-anomaly-detection |
MUST read at Phase 2 |
Schema-level freshness/completeness via Data Quality API |
monitoring/02-databricks-aibi-dashboards |
MUST read at Phase 3 |
Dashboard JSON, widget patterns, deployment |
monitoring/03-sql-alerting-patterns |
MUST read at Phase 4 |
Config-driven alerts, SDK deployment, severity routing |
🔴 Non-Negotiable Defaults
| Default |
Value |
Applied Where |
NEVER Do This Instead |
| Manifest required |
plans/manifests/observability-manifest.yaml |
Phase 0 — before any implementation |
❌ NEVER create artifacts via self-discovery; STOP if manifest is missing |
| Monitor type |
MonitorTimeSeries or MonitorSnapshot |
Every Lakehouse Monitor |
❌ NEVER skip monitor type selection |
| Custom metrics |
input_columns=[":table"] for table-level KPIs |
Every custom business metric |
❌ NEVER use column-level when table-level is needed |
| Anomaly detection ID |
Schema UUID from w.schemas.get() |
Every create_monitor() call |
❌ NEVER pass three-level name as object_id |
| Anomaly detection object |
Wrap in Monitor(object_type="schema", ...) |
Every create_monitor() call |
❌ NEVER pass keyword args directly |
| Dashboard deployment |
Lakeview JSON with dataset_catalog/dataset_schema |
Every dashboard |
❌ NEVER hardcode catalog/schema in dashboard queries |
| Alert queries |
Fully qualified table names (no parameters) |
Every SQL alert query |
❌ NEVER use parameterized table names in alerts |
| Serverless |
environments: block with environment_key |
Every monitoring job |
❌ NEVER define job_clusters: |
Working Memory Management
This orchestrator spans 5 phases (Phase 0-4). To maintain coherence without context pollution:
After each phase, persist a brief summary note capturing:
- Phase 0 output: Manifest loaded, planning_mode (acceleration/workshop), artifact counts (monitors, anomaly detection schemas, dashboards, alerts), validation passed
- Phase 1 output: Monitor names and IDs, tables monitored, custom metrics config, any creation failures
- Phase 2 output: Anomaly detection enabled (yes/no per schema), schema UUIDs, excluded tables, any permission errors
- Phase 3 output: Dashboard names and IDs, Lakeview JSON paths, dataset_catalog/dataset_schema settings
- Phase 4 output: Alert names and configurations, notification destinations, query SQL paths
What to keep in working memory: Only the current phase's worker skill, the artifact inventory (from Phase 0), and the previous phase's summary note. Discard intermediate outputs (full JSON payloads, raw monitoring metrics) — they are on disk and reproducible.
Phased Implementation Workflow
Phase 0: Read Plan — MANDATORY (5 minutes)
The observability manifest is REQUIRED. Do NOT proceed without it.
This orchestrator implements exactly what the project plan defined — no more, no less. The manifest plans/manifests/observability-manifest.yaml is generated by the planning/00-project-planning skill (stage 5) and serves as the implementation contract.
🔴 If the manifest does not exist, STOP and tell the user:
"The observability manifest (plans/manifests/observability-manifest.yaml) is missing. This orchestrator requires a project plan to define which monitors, dashboards, alerts, and anomaly detection schemas to create. Please run the planning/00-project-planning skill first (stage 5), then return here."
import yaml
from pathlib import Path
manifest_path = Path("plans/manifests/observability-manifest.yaml")
if not manifest_path.exists():
raise FileNotFoundError(
"REQUIRED: plans/manifests/observability-manifest.yaml not found. "
"Run planning/00-project-planning (stage 5) first to generate the "
"observability manifest, then re-run this orchestrator."
)
with open(manifest_path) as f:
manifest = yaml.safe_load(f)
# Respect planning mode — workshop mode means strict artifact caps
planning_mode = manifest.get('planning_mode', 'acceleration')
if planning_mode == 'workshop':
print("⚠️ Workshop mode active — creating ONLY the artifacts listed in the manifest")
# Extract implementation checklist from manifest
monitors = manifest.get('lakehouse_monitors', [])
anomaly_detection = manifest.get('anomaly_detection', {})
dashboards = manifest.get('dashboards', [])
alerts = manifest.get('alerts', [])
print(f"Plan: {len(monitors)} monitors, "
f"{len(anomaly_detection.get('schemas', []))} anomaly detection schemas, "
f"{len(dashboards)} dashboards, {len(alerts)} alerts")
# Validate summary counts match actual artifact counts
summary = manifest.get('summary', {})
assert len(monitors) == int(summary.get('total_monitors', len(monitors))), \
f"Monitor count mismatch: {len(monitors)} actual vs {summary.get('total_monitors')} in summary"
assert len(dashboards) == int(summary.get('total_dashboards', len(dashboards))), \
f"Dashboard count mismatch: {len(dashboards)} actual vs {summary.get('total_dashboards')} in summary"
assert len(alerts) == int(summary.get('total_alerts', len(alerts))), \
f"Alert count mismatch: {len(alerts)} actual vs {summary.get('total_alerts')} in summary"
What the manifest provides:
lakehouse_monitors[] — table name, monitor type, custom metrics, slicing expressions
anomaly_detection — schemas to enable, tables to exclude per schema
dashboards[] — name, domain, pages, widgets with query sources
alerts[] — alert ID, severity, query SQL, threshold, schedule, notification destination
summary — expected artifact counts for validation
planning_mode — acceleration (full) or workshop (capped artifacts; do NOT expand via self-discovery)
Key principle: Create ONLY the artifacts listed in the manifest. Do NOT add monitors, dashboards, or alerts beyond what the plan specified. If the plan missed something, update the plan first — then re-run this orchestrator.
Phase 1: Lakehouse Monitoring (1-2 hours)
MANDATORY: Read each skill below using the Read tool BEFORE writing any code for this phase:
| # |
Skill Path |
What It Provides |
| 1 |
skills/databricks-expert-agent/SKILL.md |
Extract-don't-generate principle |
| 2 |
data_product_accelerator/skills/monitoring/01-lakehouse-monitoring-comprehensive/SKILL.md |
Monitor setup, custom metrics |
Input: manifest['lakehouse_monitors'] — iterate over the manifest's monitor list. Each entry defines table_name, monitor_type, custom_metrics, and slicing_exprs. Do NOT add monitors for tables not listed in the manifest.
Steps:
- Read
manifest['lakehouse_monitors'] — this is your complete list of tables to monitor
- For each entry, use the manifest's
monitor_type (TimeSeries or Snapshot) — do not override
- Define custom business metrics from the manifest's
custom_metrics array using input_columns=[":table"] for table-level KPIs
- Create monitor setup script with graceful degradation (delete-then-create pattern)
- Deploy monitors and verify metric tables are populated
- Track completion: check off each manifest entry as its monitor is confirmed active
Phase 2: Anomaly Detection (15-30 minutes)
MANDATORY: Read each skill below using the Read tool BEFORE writing any code for this phase:
| # |
Skill Path |
What It Provides |
| 1 |
data_product_accelerator/skills/monitoring/04-anomaly-detection/SKILL.md |
Schema-level freshness/completeness via Data Quality API |
Input: manifest['anomaly_detection'] — the manifest defines which schemas to enable and which tables to exclude per schema. If the manifest's anomaly_detection section is empty or absent, skip this phase entirely.
Why Phase 2 (right after Lakehouse Monitors): Enable anomaly detection early so ML models start training on historical commit and row-count patterns. By the time you finish Phases 3-4, the first scan results will be available for dashboards and alerts.
Steps:
- Read
manifest['anomaly_detection']['schemas'] — this is your complete list of schemas to enable
- For each schema entry, retrieve the schema UUID via
w.schemas.get(full_name=f"{catalog}.{schema}")
- Enable anomaly detection using
w.data_quality.create_monitor() with a Monitor object:from databricks.sdk.service.dataquality import Monitor, AnomalyDetectionConfig
schema_info = w.schemas.get(full_name=f"{catalog}.{schema}")
w.data_quality.create_monitor(
monitor=Monitor(
object_type="schema",
object_id=schema_info.schema_id,
anomaly_detection_config=AnomalyDetectionConfig(
excluded_table_full_names=[
f"{catalog}.{schema}.staging_table", # Optional: skip staging/temp tables
]
)
)
)
- Exclude tables listed in the manifest entry's
excluded_tables via excluded_table_full_names
- Handle idempotency — if already enabled, catch
"already exists" and skip gracefully
- Verify enablement via Catalog Explorer (schema Details tab) or
w.data_quality.get_monitor()
- Track completion: check off each manifest schema entry as its anomaly detection is confirmed active
- Note: first scan takes 15-30 minutes; results appear in
system.data_quality_monitoring.table_results
Phase 3: AI/BI Dashboards (1-2 hours)
MANDATORY: Read each skill below using the Read tool BEFORE writing any code for this phase:
| # |
Skill Path |
What It Provides |
| 1 |
data_product_accelerator/skills/monitoring/02-databricks-aibi-dashboards/SKILL.md |
Dashboard JSON, widget patterns |
Input: manifest['dashboards'] — iterate over the manifest's dashboard list. Each entry defines name, domain, pages, and widgets. Do NOT create dashboards not listed in the manifest.
Steps:
- Read
manifest['dashboards'] — this is your complete list of dashboards to create
- For each dashboard, use the manifest's page layout and widget definitions to design the Lakeview JSON
- Create queries using monitoring profile/drift tables as specified in widget
query_source
- Build widget configurations with proper number formatting
- Set
dataset_catalog and dataset_schema for environment portability
- Deploy dashboard via Asset Bundle or API
- Track completion: check off each manifest entry as its dashboard is confirmed deployed
Phase 4: SQL Alerts (1 hour)
MANDATORY: Read each skill below using the Read tool BEFORE writing any code for this phase:
| # |
Skill Path |
What It Provides |
| 1 |
data_product_accelerator/skills/monitoring/03-sql-alerting-patterns/SKILL.md |
Config-driven alerts, SDK deployment |
| 2 |
skills/databricks-asset-bundles/SKILL.md |
Job YAML for alert deployment |
Input: manifest['alerts'] — iterate over the manifest's alert list. Each entry defines alert_id, severity, query, threshold, schedule, and notification_destination. Do NOT create alerts not listed in the manifest.
Steps:
- Read
manifest['alerts'] — this is your complete list of alerts to create
- Create alert configuration table (Delta table-based, severity-driven) using the manifest's alert definitions
- Use each alert's
query SQL, threshold, operator, and schedule exactly as specified in the manifest
- Deploy alerts via Databricks SDK (V2 dict-based or typed classes)
- Configure notification destinations per the manifest's
notification_destination and severity fields
- Set up Quartz cron schedules from the manifest's
schedule field
- Track completion: check off each manifest
alert_id as its alert is confirmed deployed
Post-Creation Validation
Manifest Compliance (CRITICAL)
Common Skill Compliance
Observability Specifics
Pipeline Progression
Previous stage: semantic-layer-setup → Metric Views, TVFs, and Genie Spaces should exist
Next stage: After completing observability, proceed to:
ml/00-ml-pipeline-setup — Set up ML models, experiments, and batch inference
Related Skills
| Skill |
Relationship |
Path |
lakehouse-monitoring-comprehensive |
Mandatory — Monitor setup |
monitoring/01-lakehouse-monitoring-comprehensive/SKILL.md |
anomaly-detection |
Mandatory — Schema-level freshness/completeness |
monitoring/04-anomaly-detection/SKILL.md |
databricks-aibi-dashboards |
Mandatory — Dashboard patterns |
monitoring/02-databricks-aibi-dashboards/SKILL.md |
sql-alerting-patterns |
Mandatory — Alert framework |
monitoring/03-sql-alerting-patterns/SKILL.md |
databricks-expert-agent |
Mandatory — Extraction principle |
skills/databricks-expert-agent/SKILL.md |
databricks-asset-bundles |
Mandatory — Deployment |
skills/databricks-asset-bundles/SKILL.md |
databricks-python-imports |
Mandatory — Python patterns |
common/databricks-python-imports/SKILL.md |
Post-Completion: Skill Usage Summary (MANDATORY)
After completing all phases of this orchestrator, output a Skill Usage Summary reflecting what you ACTUALLY did — not a pre-written summary.
What to Include
- Every skill
SKILL.md or references/ file you read (via the Read tool), in the order you read them
- Which phase you were in when you read it
- Whether it was a Worker, Common, Cross-domain, or Reference file
- A one-line description of what you specifically used it for in this session
Format
| # |
Phase |
Skill / Reference Read |
Type |
What It Was Used For |
| 1 |
Phase N |
path/to/SKILL.md |
Worker / Common / Cross-domain / Reference |
One-line description |
Summary Footer
End with:
- Totals: X worker skills, Y common skills, Z reference files read across N phases
- Skipped: List any skills from the dependency table above that you did NOT need to read, and why (e.g., "phase not applicable", "user skipped", "no issues encountered")
- Unplanned: List any skills you read that were NOT listed in the dependency table (e.g., for troubleshooting, edge cases, or user-requested detours)
References
1---2name: observability-setup3description: End-to-end orchestrator for setting up Databricks observability including Lakehouse Monitoring, Anomaly Detection, AI/BI Dashboards, and SQL Alerts. Guides users through monitor creation for Gold tables, schema-level anomaly detection for freshness/completeness, dashboard design with monitoring widgets, and config-driven alerting. Orchestrates mandatory dependencies on monitoring skills (lakehouse-monitoring-comprehensive, anomaly-detection, databricks-aibi-dashboards, sql-alerting-patterns) and common skills (databricks-asset-bundles, databricks-expert-agent, databricks-python-imports). Use when setting up observability end-to-end, creating Lakehouse Monitors, enabling anomaly detection, building dashboards, or configuring SQL alerts.4license: Apache-2.05---67# Observability Setup Orchestrator89End-to-end workflow for setting up Databricks observability — Lakehouse Monitoring, Anomaly Detection, AI/BI Dashboards, and SQL Alerts — on top of a completed Gold layer and semantic layer.1011**Predecessor:** `semantic-layer-setup` skill (Semantic layer should be complete, but Gold tables are the minimum requirement)1213**Time Estimate:** 3-5 hours for initial setup, 30 min per additional table/dashboard1415**What You'll Create:**161. Lakehouse Monitors — data quality, drift, and custom business KPIs for Gold tables172. Anomaly Detection — schema-level freshness and completeness monitoring via the Data Quality API183. AI/BI Dashboards — Lakeview dashboards with monitoring widgets and business metrics194. SQL Alerts — config-driven alerting with severity-based routing2021---2223## Decision Tree2425| Question | Action |26|----------|--------|27| Setting up observability end-to-end? | **Use this skill** — it orchestrates everything |28| Only need Lakehouse Monitoring? | Read `monitoring/01-lakehouse-monitoring-comprehensive/SKILL.md` directly |29| Only need Anomaly Detection? | Read `monitoring/04-anomaly-detection/SKILL.md` directly |30| Only need AI/BI Dashboards? | Read `monitoring/02-databricks-aibi-dashboards/SKILL.md` directly. **Still load common skills first:** `databricks-expert-agent`, `naming-tagging-standards` |31| Only need SQL Alerts? | Read `monitoring/03-sql-alerting-patterns/SKILL.md` directly |3233---3435## Mandatory Skill Dependencies3637**CRITICAL: Before generating ANY code for observability, you MUST read and follow the patterns in these common skills. Do NOT generate these patterns from memory.**3839| Phase | MUST Read Skill (use Read tool on SKILL.md) | What It Provides |40|-------|---------------------------------------------|------------------|41| All phases | `skills/databricks-expert-agent` | Core extraction principle: extract names from source, never hardcode |42| Monitor scripts | `common/databricks-python-imports` | Pure Python module patterns for helpers |43| Job deployment | `skills/databricks-asset-bundles` | Job YAML, deployment patterns |44| Troubleshooting | `common/databricks-autonomous-operations` | Deploy → Poll → Diagnose → Fix → Redeploy loop when jobs fail |4546### Monitoring-Domain Dependencies4748| Skill | Requirement | What It Provides |49|-------|-------------|------------------|50| `monitoring/01-lakehouse-monitoring-comprehensive` | **MUST read** at Phase 1 | Monitor setup, custom metrics, graceful degradation |51| `monitoring/04-anomaly-detection` | **MUST read** at Phase 2 | Schema-level freshness/completeness via Data Quality API |52| `monitoring/02-databricks-aibi-dashboards` | **MUST read** at Phase 3 | Dashboard JSON, widget patterns, deployment |53| `monitoring/03-sql-alerting-patterns` | **MUST read** at Phase 4 | Config-driven alerts, SDK deployment, severity routing |5455---5657## 🔴 Non-Negotiable Defaults5859| Default | Value | Applied Where | NEVER Do This Instead |60|---------|-------|---------------|----------------------|61| **Manifest required** | `plans/manifests/observability-manifest.yaml` | Phase 0 — before any implementation | ❌ NEVER create artifacts via self-discovery; STOP if manifest is missing |62| **Monitor type** | `MonitorTimeSeries` or `MonitorSnapshot` | Every Lakehouse Monitor | ❌ NEVER skip monitor type selection |63| **Custom metrics** | `input_columns=[":table"]` for table-level KPIs | Every custom business metric | ❌ NEVER use column-level when table-level is needed |64| **Anomaly detection ID** | Schema UUID from `w.schemas.get()` | Every `create_monitor()` call | ❌ NEVER pass three-level name as `object_id` |65| **Anomaly detection object** | Wrap in `Monitor(object_type="schema", ...)` | Every `create_monitor()` call | ❌ NEVER pass keyword args directly |66| **Dashboard deployment** | Lakeview JSON with `dataset_catalog`/`dataset_schema` | Every dashboard | ❌ NEVER hardcode catalog/schema in dashboard queries |67| **Alert queries** | Fully qualified table names (no parameters) | Every SQL alert query | ❌ NEVER use parameterized table names in alerts |68| **Serverless** | `environments:` block with `environment_key` | Every monitoring job | ❌ NEVER define `job_clusters:` |6970---7172## Working Memory Management7374This orchestrator spans 5 phases (Phase 0-4). To maintain coherence without context pollution:7576**After each phase, persist a brief summary note** capturing:77- **Phase 0 output:** Manifest loaded, planning_mode (acceleration/workshop), artifact counts (monitors, anomaly detection schemas, dashboards, alerts), validation passed78- **Phase 1 output:** Monitor names and IDs, tables monitored, custom metrics config, any creation failures79- **Phase 2 output:** Anomaly detection enabled (yes/no per schema), schema UUIDs, excluded tables, any permission errors80- **Phase 3 output:** Dashboard names and IDs, Lakeview JSON paths, dataset_catalog/dataset_schema settings81- **Phase 4 output:** Alert names and configurations, notification destinations, query SQL paths8283**What to keep in working memory:** Only the current phase's worker skill, the artifact inventory (from Phase 0), and the previous phase's summary note. Discard intermediate outputs (full JSON payloads, raw monitoring metrics) — they are on disk and reproducible.8485---8687## Phased Implementation Workflow8889### Phase 0: Read Plan — MANDATORY (5 minutes)9091**The observability manifest is REQUIRED. Do NOT proceed without it.**9293This orchestrator implements exactly what the project plan defined — no more, no less. The manifest `plans/manifests/observability-manifest.yaml` is generated by the `planning/00-project-planning` skill (stage 5) and serves as the implementation contract.9495**🔴 If the manifest does not exist, STOP and tell the user:**96> *"The observability manifest (`plans/manifests/observability-manifest.yaml`) is missing. This orchestrator requires a project plan to define which monitors, dashboards, alerts, and anomaly detection schemas to create. Please run the `planning/00-project-planning` skill first (stage 5), then return here."*9798```python99import yaml100from pathlib import Path101102manifest_path = Path("plans/manifests/observability-manifest.yaml")103104if not manifest_path.exists():105 raise FileNotFoundError(106 "REQUIRED: plans/manifests/observability-manifest.yaml not found. "107 "Run planning/00-project-planning (stage 5) first to generate the "108 "observability manifest, then re-run this orchestrator."109 )110111with open(manifest_path) as f:112 manifest = yaml.safe_load(f)113114# Respect planning mode — workshop mode means strict artifact caps115planning_mode = manifest.get('planning_mode', 'acceleration')116if planning_mode == 'workshop':117 print("⚠️ Workshop mode active — creating ONLY the artifacts listed in the manifest")118119# Extract implementation checklist from manifest120monitors = manifest.get('lakehouse_monitors', [])121anomaly_detection = manifest.get('anomaly_detection', {})122dashboards = manifest.get('dashboards', [])123alerts = manifest.get('alerts', [])124125print(f"Plan: {len(monitors)} monitors, "126 f"{len(anomaly_detection.get('schemas', []))} anomaly detection schemas, "127 f"{len(dashboards)} dashboards, {len(alerts)} alerts")128129# Validate summary counts match actual artifact counts130summary = manifest.get('summary', {})131assert len(monitors) == int(summary.get('total_monitors', len(monitors))), \132 f"Monitor count mismatch: {len(monitors)} actual vs {summary.get('total_monitors')} in summary"133assert len(dashboards) == int(summary.get('total_dashboards', len(dashboards))), \134 f"Dashboard count mismatch: {len(dashboards)} actual vs {summary.get('total_dashboards')} in summary"135assert len(alerts) == int(summary.get('total_alerts', len(alerts))), \136 f"Alert count mismatch: {len(alerts)} actual vs {summary.get('total_alerts')} in summary"137```138139**What the manifest provides:**140- `lakehouse_monitors[]` — table name, monitor type, custom metrics, slicing expressions141- `anomaly_detection` — schemas to enable, tables to exclude per schema142- `dashboards[]` — name, domain, pages, widgets with query sources143- `alerts[]` — alert ID, severity, query SQL, threshold, schedule, notification destination144- `summary` — expected artifact counts for validation145- `planning_mode` — `acceleration` (full) or `workshop` (capped artifacts; do NOT expand via self-discovery)146147**Key principle:** Create ONLY the artifacts listed in the manifest. Do NOT add monitors, dashboards, or alerts beyond what the plan specified. If the plan missed something, update the plan first — then re-run this orchestrator.148149---150151### Phase 1: Lakehouse Monitoring (1-2 hours)152153**MANDATORY: Read each skill below using the Read tool BEFORE writing any code for this phase:**154155| # | Skill Path | What It Provides |156|---|------------|------------------|157| 1 | `skills/databricks-expert-agent/SKILL.md` | Extract-don't-generate principle |158| 2 | `data_product_accelerator/skills/monitoring/01-lakehouse-monitoring-comprehensive/SKILL.md` | Monitor setup, custom metrics |159160**Input:** `manifest['lakehouse_monitors']` — iterate over the manifest's monitor list. Each entry defines `table_name`, `monitor_type`, `custom_metrics`, and `slicing_exprs`. Do NOT add monitors for tables not listed in the manifest.161162**Steps:**1631. Read `manifest['lakehouse_monitors']` — this is your complete list of tables to monitor1642. For each entry, use the manifest's `monitor_type` (TimeSeries or Snapshot) — do not override1653. Define custom business metrics from the manifest's `custom_metrics` array using `input_columns=[":table"]` for table-level KPIs1664. Create monitor setup script with graceful degradation (delete-then-create pattern)1675. Deploy monitors and verify metric tables are populated1686. Track completion: check off each manifest entry as its monitor is confirmed active169170### Phase 2: Anomaly Detection (15-30 minutes)171172**MANDATORY: Read each skill below using the Read tool BEFORE writing any code for this phase:**173174| # | Skill Path | What It Provides |175|---|------------|------------------|176| 1 | `data_product_accelerator/skills/monitoring/04-anomaly-detection/SKILL.md` | Schema-level freshness/completeness via Data Quality API |177178**Input:** `manifest['anomaly_detection']` — the manifest defines which schemas to enable and which tables to exclude per schema. If the manifest's `anomaly_detection` section is empty or absent, skip this phase entirely.179180**Why Phase 2 (right after Lakehouse Monitors):** Enable anomaly detection early so ML models start training on historical commit and row-count patterns. By the time you finish Phases 3-4, the first scan results will be available for dashboards and alerts.181182**Steps:**1831. Read `manifest['anomaly_detection']['schemas']` — this is your complete list of schemas to enable1842. For each schema entry, retrieve the schema UUID via `w.schemas.get(full_name=f"{catalog}.{schema}")`1853. Enable anomaly detection using `w.data_quality.create_monitor()` with a `Monitor` object:186 ```python187 from databricks.sdk.service.dataquality import Monitor, AnomalyDetectionConfig188189 schema_info = w.schemas.get(full_name=f"{catalog}.{schema}")190 w.data_quality.create_monitor(191 monitor=Monitor(192 object_type="schema",193 object_id=schema_info.schema_id,194 anomaly_detection_config=AnomalyDetectionConfig(195 excluded_table_full_names=[196 f"{catalog}.{schema}.staging_table", # Optional: skip staging/temp tables197 ]198 )199 )200 )201 ```2024. Exclude tables listed in the manifest entry's `excluded_tables` via `excluded_table_full_names`2035. Handle idempotency — if already enabled, catch `"already exists"` and skip gracefully2046. Verify enablement via Catalog Explorer (schema Details tab) or `w.data_quality.get_monitor()`2057. Track completion: check off each manifest schema entry as its anomaly detection is confirmed active2068. Note: first scan takes 15-30 minutes; results appear in `system.data_quality_monitoring.table_results`207208### Phase 3: AI/BI Dashboards (1-2 hours)209210**MANDATORY: Read each skill below using the Read tool BEFORE writing any code for this phase:**211212| # | Skill Path | What It Provides |213|---|------------|------------------|214| 1 | `data_product_accelerator/skills/monitoring/02-databricks-aibi-dashboards/SKILL.md` | Dashboard JSON, widget patterns |215216**Input:** `manifest['dashboards']` — iterate over the manifest's dashboard list. Each entry defines `name`, `domain`, `pages`, and `widgets`. Do NOT create dashboards not listed in the manifest.217218**Steps:**2191. Read `manifest['dashboards']` — this is your complete list of dashboards to create2202. For each dashboard, use the manifest's page layout and widget definitions to design the Lakeview JSON2213. Create queries using monitoring profile/drift tables as specified in widget `query_source`2224. Build widget configurations with proper number formatting2235. Set `dataset_catalog` and `dataset_schema` for environment portability2246. Deploy dashboard via Asset Bundle or API2257. Track completion: check off each manifest entry as its dashboard is confirmed deployed226227### Phase 4: SQL Alerts (1 hour)228229**MANDATORY: Read each skill below using the Read tool BEFORE writing any code for this phase:**230231| # | Skill Path | What It Provides |232|---|------------|------------------|233| 1 | `data_product_accelerator/skills/monitoring/03-sql-alerting-patterns/SKILL.md` | Config-driven alerts, SDK deployment |234| 2 | `skills/databricks-asset-bundles/SKILL.md` | Job YAML for alert deployment |235236**Input:** `manifest['alerts']` — iterate over the manifest's alert list. Each entry defines `alert_id`, `severity`, `query`, `threshold`, `schedule`, and `notification_destination`. Do NOT create alerts not listed in the manifest.237238**Steps:**2391. Read `manifest['alerts']` — this is your complete list of alerts to create2402. Create alert configuration table (Delta table-based, severity-driven) using the manifest's alert definitions2413. Use each alert's `query` SQL, `threshold`, `operator`, and `schedule` exactly as specified in the manifest2424. Deploy alerts via Databricks SDK (V2 dict-based or typed classes)2435. Configure notification destinations per the manifest's `notification_destination` and `severity` fields2446. Set up Quartz cron schedules from the manifest's `schedule` field2457. Track completion: check off each manifest `alert_id` as its alert is confirmed deployed246247---248249## Post-Creation Validation250251### Manifest Compliance (CRITICAL)252- [ ] `plans/manifests/observability-manifest.yaml` was read at Phase 0 before any implementation253- [ ] Every Lakehouse Monitor maps 1:1 to a `lakehouse_monitors[]` entry in the manifest254- [ ] Every anomaly detection schema maps 1:1 to an `anomaly_detection.schemas[]` entry in the manifest255- [ ] Every dashboard maps 1:1 to a `dashboards[]` entry in the manifest256- [ ] Every alert maps 1:1 to an `alerts[]` entry in the manifest257- [ ] No artifacts were created via self-discovery (only manifest-driven)258- [ ] If `planning_mode: workshop`, artifact counts do NOT exceed manifest totals259- [ ] Manifest `summary` counts match actual deployed artifact counts260261### Common Skill Compliance262- [ ] Names extracted from Gold YAML (not generated) per `databricks-expert-agent`263- [ ] Asset Bundle YAML follows `databricks-asset-bundles` patterns264- [ ] Python imports follow `databricks-python-imports` patterns265266### Observability Specifics267- [ ] Lakehouse Monitors created for all critical Gold tables268- [ ] Custom business metrics use `input_columns=[":table"]` syntax269- [ ] Monitor setup uses graceful degradation (delete-then-create)270- [ ] Anomaly detection enabled on all Gold schemas (and Silver schemas if applicable)271- [ ] Anomaly detection uses schema UUID (not three-level name) as `object_id`272- [ ] Anomaly detection `create_monitor()` wrapped in `Monitor` object273- [ ] Staging/temp tables excluded via `excluded_table_full_names`274- [ ] Anomaly detection enable is idempotent (handles "already exists" gracefully)275- [ ] Dashboard uses `dataset_catalog`/`dataset_schema` for portability276- [ ] Dashboard widgets align with query columns277- [ ] Alert queries use fully qualified table names (no parameters)278- [ ] Alert severity routing configured (critical → PagerDuty, warning → email)279- [ ] All monitoring jobs use serverless compute280281---282283## Pipeline Progression284285**Previous stage:** `semantic-layer-setup` → Metric Views, TVFs, and Genie Spaces should exist286287**Next stage:** After completing observability, proceed to:288- **`ml/00-ml-pipeline-setup`** — Set up ML models, experiments, and batch inference289290---291292## Related Skills293294| Skill | Relationship | Path |295|-------|-------------|------|296| `lakehouse-monitoring-comprehensive` | **Mandatory** — Monitor setup | `monitoring/01-lakehouse-monitoring-comprehensive/SKILL.md` |297| `anomaly-detection` | **Mandatory** — Schema-level freshness/completeness | `monitoring/04-anomaly-detection/SKILL.md` |298| `databricks-aibi-dashboards` | **Mandatory** — Dashboard patterns | `monitoring/02-databricks-aibi-dashboards/SKILL.md` |299| `sql-alerting-patterns` | **Mandatory** — Alert framework | `monitoring/03-sql-alerting-patterns/SKILL.md` |300| `databricks-expert-agent` | **Mandatory** — Extraction principle | `skills/databricks-expert-agent/SKILL.md` |301| `databricks-asset-bundles` | **Mandatory** — Deployment | `skills/databricks-asset-bundles/SKILL.md` |302| `databricks-python-imports` | **Mandatory** — Python patterns | `common/databricks-python-imports/SKILL.md` |303304## Post-Completion: Skill Usage Summary (MANDATORY)305306**After completing all phases of this orchestrator, output a Skill Usage Summary reflecting what you ACTUALLY did — not a pre-written summary.**307308### What to Include3093101. Every skill `SKILL.md` or `references/` file you read (via the Read tool), in the order you read them3112. Which phase you were in when you read it3123. Whether it was a **Worker**, **Common**, **Cross-domain**, or **Reference** file3134. A one-line description of what you specifically used it for in this session314315### Format316317| # | Phase | Skill / Reference Read | Type | What It Was Used For |318|---|-------|----------------------|------|---------------------|319| 1 | Phase N | `path/to/SKILL.md` | Worker / Common / Cross-domain / Reference | One-line description |320321### Summary Footer322323End with:324- **Totals:** X worker skills, Y common skills, Z reference files read across N phases325- **Skipped:** List any skills from the dependency table above that you did NOT need to read, and why (e.g., "phase not applicable", "user skipped", "no issues encountered")326- **Unplanned:** List any skills you read that were NOT listed in the dependency table (e.g., for troubleshooting, edge cases, or user-requested detours)327328---329330## References331332- [Lakehouse Monitoring](https://learn.microsoft.com/en-us/azure/databricks/lakehouse-monitoring/create-monitor-api)333- [Anomaly Detection](https://learn.microsoft.com/en-us/azure/databricks/data-quality-monitoring/anomaly-detection/)334- [AI/BI Dashboards](https://docs.databricks.com/aws/en/dashboards/)335- [SQL Alerts](https://docs.databricks.com/api/workspace/alerts)