Contents

Chapter 1

Data Observability Setup

Data Observability Setup

Complete observability framework for Databricks data pipelines β€” lineage tracking, anomaly detection, SLA monitoring, and alerting.

By Datanest Digital | Version 1.0.0 | $49



What You Get

  • Data Lineage Tracking β€” Trace every record from source through transformations to target, stored in Delta
  • Metric Collection β€” Automated capture of row counts, durations, data volumes, and error rates
  • Statistical Anomaly Detection β€” Z-score, IQR, and moving average methods to catch pipeline drift
  • Freshness Monitoring β€” SLA-aware data freshness checks with breach detection
  • Alert Routing β€” Multi-channel alerting via Slack, PagerDuty, and email with severity-based routing
  • Dashboard-Ready Data β€” Pre-aggregated health scores and metrics for observability dashboards

File Tree

data-observability-setup/
β”œβ”€β”€ README.md
β”œβ”€β”€ manifest.json
β”œβ”€β”€ LICENSE
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ lineage_tracker.py          # Sourceβ†’transformβ†’target lineage
β”‚   β”œβ”€β”€ metric_collector.py         # Pipeline metric collection
β”‚   β”œβ”€β”€ anomaly_detector.py         # Statistical anomaly detection
β”‚   β”œβ”€β”€ freshness_monitor.py        # Data freshness & SLA monitoring
β”‚   β”œβ”€β”€ alert_manager.py            # Multi-channel alert routing
β”‚   └── dashboard_data.py           # Dashboard aggregation & health scores
β”œβ”€β”€ configs/
β”‚   β”œβ”€β”€ observability_config.yaml   # Main configuration
β”‚   └── alert_rules.yaml            # Alert rule definitions
β”œβ”€β”€ notebooks/
β”‚   β”œβ”€β”€ observability_dashboard.py  # Health & lineage dashboard
β”‚   └── setup_observability.py      # Initialize observability tables
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ conftest.py                 # Shared fixtures
β”‚   β”œβ”€β”€ test_anomaly_detector.py    # Anomaly detection tests
β”‚   └── test_freshness_monitor.py   # SLA breach tests
└── guides/
    └── data-observability-guide.md # Observability strategy guide
Chapter 2

Getting Started

Follow this guide to get data observability setup up and running in your environment.

Getting Started

1. Initialize Observability Tables

Run the setup notebook in your Databricks workspace to create the required Delta tables:

python
# In Databricks β€” run notebooks/setup_observability.py
# Creates: observability.lineage, observability.metrics,
#          observability.alerts, observability.anomalies

2. Track Lineage in Your Pipelines

python
from src.lineage_tracker import LineageTracker

tracker = LineageTracker(catalog="main", schema="observability")
tracker.register_source("raw_orders", "s3://lake/raw/orders/")
tracker.register_transformation(
    "clean_orders",
    sql="SELECT * FROM raw_orders WHERE status != 'cancelled'",
    input_datasets=["raw_orders"],
)
tracker.register_target("curated_orders", "main.curated.orders")
tracker.commit_lineage(pipeline_name="orders_etl")

3. Collect Pipeline Metrics

python
from src.metric_collector import MetricCollector

collector = MetricCollector(config_path="configs/observability_config.yaml")
with collector.track_pipeline("orders_etl"):
    # ... your pipeline code ...
    collector.record_metric("orders_etl", "row_count", 125430)
# Duration is recorded automatically

4. Enable Anomaly Detection

python
from src.anomaly_detector import AnomalyDetector

detector = AnomalyDetector(method="zscore", threshold=3.0)
anomalies = detector.detect(
    pipeline_name="orders_etl",
    metric_name="row_count",
    lookback_days=30,
)
# Returns list of AnomalyResult with severity, score, details

5. Monitor Freshness and Route Alerts

python
from src.freshness_monitor import FreshnessMonitor
from src.alert_manager import AlertManager

monitor = FreshnessMonitor(config_path="configs/observability_config.yaml")
breaches = monitor.check_all_slas()

alerts = AlertManager(config_path="configs/observability_config.yaml")
for breach in breaches:
    alerts.send(
        severity="critical",
        title=f"SLA Breach: {breach.table_name}",
        message=f"Data is {breach.hours_stale:.1f}h stale (SLA: {breach.sla_hours}h)",
    )

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Data        │───▢│  Lineage         │───▢│  Delta Tables     β”‚
β”‚  Pipelines   β”‚    β”‚  Tracker         β”‚    β”‚  (lineage store)  β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Metric      │───▢│  Anomaly         │───▢│  Alert            β”‚
β”‚  Collector   β”‚    β”‚  Detector        β”‚    β”‚  Manager          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                     β”‚
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                          β–Ό
       β”‚  Freshness       β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚  Monitor         │─────────────▢│  Slack / PagerDuty /  β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚  Email                β”‚
                                         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚  Dashboard       │◀──── Aggregated metrics & health scores
       β”‚  Data            β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Chapter 3
πŸ”’ Available in full product

Requirements

Chapter 4
πŸ”’ Available in full product

Advanced Reference

You’ve reached the end of the free preview

Get the full Data Observability Setup and unlock everything.

All Chapters

Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.

Full Tool Suite

Access all interactive tools with complete data, all workload profiles, and the full scenario library.

Source Files

Downloadable source code, configuration files, and working examples from every chapter.

Lifetime Updates

Free updates for life. Every new chapter, tool, and improvement included.

Buy Now — $49 →
πŸ“¦ Free sample included — download another copy for the full product.
Data Observability Setup v1.0.0 β€” Free Preview