[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F685H1GFZB23GHG8BH8Q1A":3,"skill-same:01M6F685H1GFZB23GHG8BH8Q1A":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":6,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M6F685H1GFZB23GHG8BH8Q1A","databricks-reference-architecture",null,"Implement Databricks reference architecture with best-practice project layout.\nUse when designing new Databricks projects, reviewing architecture,\nor establishing standards for Databricks applications.\nTrigger with phrases like \"databricks architecture\", \"databricks best practices\",\n\"databricks project structure\", \"how to organize databricks\", \"databricks layout\".","Dicklesworthstone\u002Fpi_agent_rust","Dicklesworthstone","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F35050222?v=4","01M6CG26AR942CSVMN1M5E3DSE","Jeff Emanuel","01M6CG26EPP71PSHW1VDS71121",1992,"MIT","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fdatabricks-pack\u002Fskills\u002Fdatabricks-reference-architecture\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"architecture","databricks reference architecture","reference","databricks","structure","new","when","for","project structure","how to","trigger","io","layout","project","best practices","organize","standards","best-practice","use","read","projects","how","applications","2026-11-10 10:12:30",false,"---\nname: databricks-reference-architecture\ndescription: |\n  Implement Databricks reference architecture with best-practice project layout.\n  Use when designing new Databricks projects, reviewing architecture,\n  or establishing standards for Databricks applications.\n  Trigger with phrases like \"databricks architecture\", \"databricks best practices\",\n  \"databricks project structure\", \"how to organize databricks\", \"databricks layout\".\nallowed-tools: Read, Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\n---\n\n# Databricks Reference Architecture\n\n## Overview\nProduction-ready architecture patterns for Databricks data platforms.\n\n## Prerequisites\n- Understanding of Databricks components\n- Unity Catalog configured\n- Asset Bundles knowledge\n- CI\u002FCD pipeline setup\n\n## Project Structure\n\n```\ndatabricks-platform\u002F\n├── databricks.yml                    # Main Asset Bundle config\n├── bundles\u002F\n│   ├── base.yml                      # Shared configurations\n│   ├── dev.yml                       # Dev environment overrides\n│   ├── staging.yml                   # Staging overrides\n│   └── prod.yml                      # Production overrides\n├── src\u002F\n│   ├── pipelines\u002F                    # Data pipelines\n│   │   ├── bronze\u002F\n│   │   │   ├── ingest_orders.py\n│   │   │   ├── ingest_customers.py\n│   │   │   └── ingest_products.py\n│   │   ├── silver\u002F\n│   │   │   ├── clean_orders.py\n│   │   │   ├── dedupe_customers.py\n│   │   │   └── enrich_products.py\n│   │   └── gold\u002F\n│   │       ├── agg_daily_sales.py\n│   │       ├── agg_customer_360.py\n│   │       └── agg_product_metrics.py\n│   ├── ml\u002F\n│   │   ├── features\u002F\n│   │   │   └── customer_features.py\n│   │   ├── training\u002F\n│   │   │   └── churn_model.py\n│   │   └── serving\u002F\n│   │       └── model_inference.py\n│   ├── utils\u002F\n│   │   ├── __init__.py\n│   │   ├── delta.py                  # Delta Lake utilities\n│   │   ├── quality.py                # Data quality checks\n│   │   └── logging.py                # Structured logging\n│   └── notebooks\u002F                    # Development notebooks\n│       ├── exploration\u002F\n│       └── adhoc\u002F\n├── resources\u002F\n│   ├── jobs\u002F\n│   │   ├── etl_jobs.yml\n│   │   ├── ml_jobs.yml\n│   │   └── quality_jobs.yml\n│   ├── dlt\u002F\n│   │   └── sales_pipeline.yml\n│   ├── clusters\u002F\n│   │   └── cluster_policies.yml\n│   └── sql\u002F\n│       └── dashboards.yml\n├── tests\u002F\n│   ├── unit\u002F\n│   │   ├── test_delta.py\n│   │   └── test_quality.py\n│   ├── integration\u002F\n│   │   ├── test_bronze_ingest.py\n│   │   └── test_ml_pipeline.py\n│   └── fixtures\u002F\n│       └── sample_data\u002F\n├── docs\u002F\n│   ├── architecture.md\n│   ├── runbooks\u002F\n│   └── api\u002F\n├── infrastructure\u002F\n│   ├── terraform\u002F\n│   │   ├── main.tf\n│   │   ├── unity_catalog.tf\n│   │   └── workspaces.tf\n│   └── scripts\u002F\n│       └── bootstrap.sh\n├── .github\u002F\n│   └── workflows\u002F\n│       ├── ci.yml\n│       ├── deploy-staging.yml\n│       └── deploy-prod.yml\n├── pyproject.toml\n└── README.md\n```\n\n## Layered Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    Presentation Layer                        │\n│         (Dashboards, Reports, APIs, Applications)            │\n├─────────────────────────────────────────────────────────────┤\n│                    Serving Layer                             │\n│          (SQL Warehouses, Model Endpoints, APIs)             │\n├─────────────────────────────────────────────────────────────┤\n│                    Gold Layer                                │\n│     (Business Aggregations, Features, Curated Datasets)      │\n├─────────────────────────────────────────────────────────────┤\n│                    Silver Layer                              │\n│        (Cleansed, Conformed, Deduplicated Data)              │\n├─────────────────────────────────────────────────────────────┤\n│                    Bronze Layer                              │\n│            (Raw Data with Metadata, Immutable)               │\n├─────────────────────────────────────────────────────────────┤\n│                    Ingestion Layer                           │\n│       (Auto Loader, DLT, Streaming, Batch Connectors)        │\n├─────────────────────────────────────────────────────────────┤\n│                    Source Systems                            │\n│    (Databases, Files, APIs, Streaming, SaaS Applications)    │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Unity Catalog Structure\n\n```sql\n-- Catalog hierarchy for data platform\nCREATE CATALOG IF NOT EXISTS data_platform;\n\n-- Environment-specific schemas\nCREATE SCHEMA IF NOT EXISTS data_platform.bronze;\nCREATE SCHEMA IF NOT EXISTS data_platform.silver;\nCREATE SCHEMA IF NOT EXISTS data_platform.gold;\nCREATE SCHEMA IF NOT EXISTS data_platform.ml_features;\nCREATE SCHEMA IF NOT EXISTS data_platform.ml_models;\n\n-- Shared reference data\nCREATE SCHEMA IF NOT EXISTS data_platform.reference;\n\n-- Governance setup\nGRANT USAGE ON CATALOG data_platform TO `data-engineers`;\nGRANT SELECT ON SCHEMA data_platform.gold TO `data-analysts`;\nGRANT ALL PRIVILEGES ON SCHEMA data_platform.ml_features TO `data-scientists`;\n```\n\n## Key Components\n\n### Step 1: Delta Lake Configuration\n```python\n# src\u002Futils\u002Fdelta.py\nfrom pyspark.sql import SparkSession\nfrom delta.tables import DeltaTable\n\nclass DeltaConfig:\n    \"\"\"Centralized Delta Lake configuration.\"\"\"\n\n    # Table properties for all tables\n    DEFAULT_PROPERTIES = {\n        \"delta.autoOptimize.optimizeWrite\": \"true\",\n        \"delta.autoOptimize.autoCompact\": \"true\",\n        \"delta.deletionVectors.enabled\": \"true\",\n        \"delta.enableChangeDataFeed\": \"true\",\n    }\n\n    # Default retention for time travel\n    RETENTION_HOURS = 168  # 7 days\n\n    @staticmethod\n    def create_table_with_defaults(\n        spark: SparkSession,\n        df,\n        table_name: str,\n        partition_by: list[str] = None,\n        cluster_by: list[str] = None,\n    ):\n        \"\"\"Create Delta table with standard configurations.\"\"\"\n        writer = df.write.format(\"delta\")\n\n        # Apply partitioning or clustering\n        if cluster_by:\n            # Liquid clustering (preferred for new tables)\n            writer = writer.option(\"clusteringColumns\", \",\".join(cluster_by))\n        elif partition_by:\n            writer = writer.partitionBy(*partition_by)\n\n        # Write table\n        writer.saveAsTable(table_name)\n\n        # Apply properties\n        for key, value in DeltaConfig.DEFAULT_PROPERTIES.items():\n            spark.sql(f\"ALTER TABLE {table_name} SET TBLPROPERTIES ('{key}' = '{value}')\")\n```\n\n### Step 2: Data Quality Framework\n```python\n# src\u002Futils\u002Fquality.py\nfrom pyspark.sql import DataFrame\nfrom dataclasses import dataclass\nfrom typing import Callable\n\n@dataclass\nclass QualityCheck:\n    \"\"\"Data quality check definition.\"\"\"\n    name: str\n    check_fn: Callable[[DataFrame], bool]\n    severity: str = \"ERROR\"  # ERROR, WARNING, INFO\n\nclass QualityFramework:\n    \"\"\"Centralized data quality checks.\"\"\"\n\n    def __init__(self, spark):\n        self.spark = spark\n        self.checks: list[QualityCheck] = []\n        self.results: list[dict] = []\n\n    def add_check(self, check: QualityCheck):\n        \"\"\"Register a quality check.\"\"\"\n        self.checks.append(check)\n\n    def run_checks(self, df: DataFrame, table_name: str) -> bool:\n        \"\"\"Run all registered checks.\"\"\"\n        all_passed = True\n\n        for check in self.checks:\n            try:\n                passed = check.check_fn(df)\n                self.results.append({\n                    \"table\": table_name,\n                    \"check\": check.name,\n                    \"passed\": passed,\n                    \"severity\": check.severity,\n                })\n                if not passed and check.severity == \"ERROR\":\n                    all_passed = False\n            except Exception as e:\n                self.results.append({\n                    \"table\": table_name,\n                    \"check\": check.name,\n                    \"passed\": False,\n                    \"error\": str(e),\n                })\n                all_passed = False\n\n        return all_passed\n\n# Standard checks\ndef not_null_check(column: str) -> QualityCheck:\n    return QualityCheck(\n        name=f\"not_null_{column}\",\n        check_fn=lambda df: df.filter(f\"{column} IS NULL\").count() == 0,\n    )\n\ndef unique_check(columns: list[str]) -> QualityCheck:\n    cols = \", \".join(columns)\n    return QualityCheck(\n        name=f\"unique_{cols}\",\n        check_fn=lambda df: df.groupBy(columns).count().filter(\"count > 1\").count() == 0,\n    )\n\ndef range_check(column: str, min_val, max_val) -> QualityCheck:\n    return QualityCheck(\n        name=f\"range_{column}\",\n        check_fn=lambda df: df.filter(f\"{column} \u003C {min_val} OR {column} > {max_val}\").count() == 0,\n    )\n```\n\n### Step 3: Job Template\n```yaml\n# resources\u002Fjobs\u002Fetl_job_template.yml\nresources:\n  jobs:\n    ${job_name}:\n      name: \"${bundle.name}-${job_name}-${bundle.target}\"\n\n      tags:\n        domain: ${domain}\n        tier: ${tier}\n        owner: ${owner}\n        environment: ${bundle.target}\n\n      schedule:\n        quartz_cron_expression: ${schedule}\n        timezone_id: \"UTC\"\n\n      max_concurrent_runs: 1\n      timeout_seconds: ${timeout_seconds}\n\n      queue:\n        enabled: true\n\n      email_notifications:\n        on_failure: ${alert_emails}\n\n      health:\n        rules:\n          - metric: RUN_DURATION_SECONDS\n            op: GREATER_THAN\n            value: ${duration_threshold}\n\n      tasks:\n        - task_key: ${task_name}\n          job_cluster_key: ${cluster_key}\n          libraries:\n            - whl: ..\u002Fartifacts\u002Fdata_platform\u002F*.whl\n          notebook_task:\n            notebook_path: ${notebook_path}\n            base_parameters:\n              catalog: ${var.catalog}\n              schema: ${var.schema}\n              run_date: \"{{job.parameters.run_date}}\"\n```\n\n### Step 4: Monitoring Dashboard\n```sql\n-- Create monitoring views for operational dashboard\n\n-- Job health summary\nCREATE OR REPLACE VIEW data_platform.monitoring.job_health AS\nSELECT\n    job_name,\n    DATE(start_time) as run_date,\n    COUNT(*) as total_runs,\n    SUM(CASE WHEN result_state = 'SUCCESS' THEN 1 ELSE 0 END) as successes,\n    SUM(CASE WHEN result_state = 'FAILED' THEN 1 ELSE 0 END) as failures,\n    AVG(duration) \u002F 60000 as avg_duration_minutes,\n    MAX(duration) \u002F 60000 as max_duration_minutes\nFROM system.lakeflow.job_run_timeline\nWHERE start_time > current_timestamp() - INTERVAL 7 DAYS\nGROUP BY job_name, DATE(start_time);\n\n-- Data freshness tracking\nCREATE OR REPLACE VIEW data_platform.monitoring.data_freshness AS\nSELECT\n    table_catalog,\n    table_schema,\n    table_name,\n    MAX(commit_timestamp) as last_update,\n    TIMESTAMPDIFF(HOUR, MAX(commit_timestamp), current_timestamp()) as hours_since_update\nFROM system.information_schema.table_history\nGROUP BY table_catalog, table_schema, table_name;\n```\n\n## Data Flow Diagram\n\n```\n┌─────────────┐     ┌─────────────┐     ┌─────────────┐\n│   Sources   │────▶│  Ingestion  │────▶│   Bronze    │\n│ (S3, JDBC)  │     │ (Auto Loader│     │  (Raw Data) │\n└─────────────┘     │  DLT, APIs) │     └──────┬──────┘\n                    └─────────────┘            │\n                                               ▼\n                    ┌─────────────┐     ┌─────────────┐\n                    │   Silver    │◀────│  Transform  │\n                    │  (Cleansed) │     │   (Spark)   │\n                    └──────┬──────┘     └─────────────┘\n                           │\n                           ▼\n┌─────────────┐     ┌─────────────┐     ┌─────────────┐\n│   Serve     │◀────│    Gold     │◀────│  Aggregate  │\n│ (Warehouse, │     │ (Analytics) │     │   (Spark)   │\n│   APIs)     │     └─────────────┘     └─────────────┘\n└─────────────┘\n```\n\n## Instructions\n\n### Step 1: Initialize Project\n```bash\n# Clone template\ngit clone https:\u002F\u002Fgithub.com\u002Fdatabricks\u002Fbundle-examples.git\ncd bundle-examples\u002Fdefault-python\n\n# Customize for your project\nmv databricks.yml.template databricks.yml\n```\n\n### Step 2: Configure Environments\nSet up dev, staging, and prod targets in `databricks.yml`.\n\n### Step 3: Implement Pipelines\nCreate Bronze, Silver, Gold pipelines following medallion architecture.\n\n### Step 4: Add Quality Checks\nIntegrate data quality framework into each layer.\n\n## Output\n- Structured project layout\n- Medallion architecture implemented\n- Data quality framework integrated\n- Monitoring dashboards ready\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Circular dependencies | Wrong layering | Review medallion flow |\n| Config not loading | Wrong paths | Verify bundle includes |\n| Quality check failures | Bad data | Add data quarantine |\n| Schema drift | Source changes | Enable schema evolution |\n\n## Examples\n\n### Quick Setup Script\n```bash\n#!\u002Fbin\u002Fbash\n# Initialize reference architecture\n\nmkdir -p src\u002F{pipelines\u002F{bronze,silver,gold},ml,utils,notebooks}\nmkdir -p resources\u002F{jobs,dlt,clusters}\nmkdir -p tests\u002F{unit,integration}\nmkdir -p infrastructure\u002Fterraform\nmkdir -p docs\u002Frunbooks\n\n# Create initial files\ntouch src\u002Futils\u002F{__init__,delta,quality,logging}.py\ntouch resources\u002Fjobs\u002Fetl_jobs.yml\ntouch databricks.yml\n\necho \"Reference architecture initialized!\"\n```\n\n## Resources\n- [Databricks Architecture](https:\u002F\u002Fdocs.databricks.com\u002Flakehouse-architecture\u002Findex.html)\n- [Medallion Architecture](https:\u002F\u002Fwww.databricks.com\u002Fglossary\u002Fmedallion-architecture)\n- [Asset Bundles](https:\u002F\u002Fdocs.databricks.com\u002Fdev-tools\u002Fbundles\u002Findex.html)\n- [Unity Catalog Best Practices](https:\u002F\u002Fdocs.databricks.com\u002Fdata-governance\u002Funity-catalog\u002Fbest-practices.html)\n\n## Flagship Skills\nFor multi-environment setup, see `databricks-multi-env-setup`.\n","# Databricks Reference Architecture\n\n## Overview\nProduction-ready architecture patterns for Databricks data platforms.\n\n## Prerequisites\n- Understanding of Databricks components\n- Unity Catalog configured\n- Asset Bundles knowledge\n- CI\u002FCD pipeline setup\n\n## Project Structure\n\n```\ndatabricks-platform\u002F\n├── databricks.yml                    # Main Asset Bundle config\n├── bundles\u002F\n│   ├── base.yml                      # Shared configurations\n│   ├── dev.yml                       # Dev environment overrides\n│   ├── staging.yml                   # Staging overrides\n│   └── prod.yml                      # Production overrides\n├── src\u002F\n│   ├── pipelines\u002F                    # Data pipelines\n│   │   ├── bronze\u002F\n│   │   │   ├── ingest_orders.py\n│   │   │   ├── ingest_customers.py\n│   │   │   └── ingest_products.py\n│   │   ├── silver\u002F\n│   │   │   ├── clean_orders.py\n│   │   │   ├── dedupe_customers.py\n│   │   │   └── enrich_products.py\n│   │   └── gold\u002F\n│   │       ├── agg_daily_sales.py\n│   │       ├── agg_customer_360.py\n│   │       └── agg_product_metrics.py\n│   ├── ml\u002F\n│   │   ├── features\u002F\n│   │   │   └── customer_features.py\n│   │   ├── training\u002F\n│   │   │   └── churn_model.py\n│   │   └── serving\u002F\n│   │       └── model_inference.py\n│   ├── utils\u002F\n│   │   ├── __init__.py\n│   │   ├── delta.py                  # Delta Lake utilities\n│   │   ├── quality.py                # Data quality checks\n│   │   └── logging.py                # Structured logging\n│   └── notebooks\u002F                    # Development notebooks\n│       ├── exploration\u002F\n│       └── adhoc\u002F\n├── resources\u002F\n│   ├── jobs\u002F\n│   │   ├── etl_jobs.yml\n│   │   ├── ml_jobs.yml\n│   │   └── quality_jobs.yml\n│   ├── dlt\u002F\n│   │   └── sales_pipeline.yml\n│   ├── clusters\u002F\n│   │   └── cluster_policies.yml\n│   └── sql\u002F\n│       └── dashboards.yml\n├── tests\u002F\n│   ├── unit\u002F\n│   │   ├── test_delta.py\n│   │   └── test_quality.py\n│   ├── integration\u002F\n│   │   ├── test_bronze_ingest.py\n│   │   └── test_ml_pipeline.py\n│   └── fixtures\u002F\n│       └── sample_data\u002F\n├── docs\u002F\n│   ├── architecture.md\n│   ├── runbooks\u002F\n│   └── api\u002F\n├── infrastructure\u002F\n│   ├── terraform\u002F\n│   │   ├── main.tf\n│   │   ├── unity_catalog.tf\n│   │   └── workspaces.tf\n│   └── scripts\u002F\n│       └── bootstrap.sh\n├── .github\u002F\n│   └── workflows\u002F\n│       ├── ci.yml\n│       ├── deploy-staging.yml\n│       └── deploy-prod.yml\n├── pyproject.toml\n└── README.md\n```\n\n## Layered Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    Presentation Layer                        │\n│         (Dashboards, Reports, APIs, Applications)            │\n├─────────────────────────────────────────────────────────────┤\n│                    Serving Layer                             │\n│          (SQL Warehouses, Model Endpoints, APIs)             │\n├─────────────────────────────────────────────────────────────┤\n│                    Gold Layer                                │\n│     (Business Aggregations, Features, Curated Datasets)      │\n├─────────────────────────────────────────────────────────────┤\n│                    Silver Layer                              │\n│        (Cleansed, Conformed, Deduplicated Data)              │\n├─────────────────────────────────────────────────────────────┤\n│                    Bronze Layer                              │\n│            (Raw Data with Metadata, Immutable)               │\n├─────────────────────────────────────────────────────────────┤\n│                    Ingestion Layer                           │\n│       (Auto Loader, DLT, Streaming, Batch Connectors)        │\n├─────────────────────────────────────────────────────────────┤\n│                    Source Systems                            │\n│    (Databases, Files, APIs, Streaming, SaaS Applications)    │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Unity Catalog Structure\n\n```sql\n-- Catalog hierarchy for data platform\nCREATE CATALOG IF NOT EXISTS data_platform;\n\n-- Environment-specific schemas\nCREATE SCHEMA IF NOT EXISTS data_platform.bronze;\nCREATE SCHEMA IF NOT EXISTS data_platform.silver;\nCREATE SCHEMA IF NOT EXISTS data_platform.gold;\nCREATE SCHEMA IF NOT EXISTS data_platform.ml_features;\nCREATE SCHEMA IF NOT EXISTS data_platform.ml_models;\n\n-- Shared reference data\nCREATE SCHEMA IF NOT EXISTS data_platform.reference;\n\n-- Governance setup\nGRANT USAGE ON CATALOG data_platform TO `data-engineers`;\nGRANT SELECT ON SCHEMA data_platform.gold TO `data-analysts`;\nGRANT ALL PRIVILEGES ON SCHEMA data_platform.ml_features TO `data-scientists`;\n```\n\n## Key Components\n\n### Step 1: Delta Lake Configuration\n```python\n# src\u002Futils\u002Fdelta.py\nfrom pyspark.sql import SparkSession\nfrom delta.tables import DeltaTable\n\nclass DeltaConfig:\n    \"\"\"Centralized Delta Lake configuration.\"\"\"\n\n    # Table properties for all tables\n    DEFAULT_PROPERTIES = {\n        \"delta.autoOptimize.optimizeWrite\": \"true\",\n        \"delta.autoOptimize.autoCompact\": \"true\",\n        \"delta.deletionVectors.enabled\": \"true\",\n        \"delta.enableChangeDataFeed\": \"true\",\n    }\n\n    # Default retention for time travel\n    RETENTION_HOURS = 168  # 7 days\n\n    @staticmethod\n    def create_table_with_defaults(\n        spark: SparkSession,\n        df,\n        table_name: str,\n        partition_by: list[str] = None,\n        cluster_by: list[str] = None,\n    ):\n        \"\"\"Create Delta table with standard configurations.\"\"\"\n        writer = df.write.format(\"delta\")\n\n        # Apply partitioning or clustering\n        if cluster_by:\n            # Liquid clustering (preferred for new tables)\n            writer = writer.option(\"clusteringColumns\", \",\".join(cluster_by))\n        elif partition_by:\n            writer = writer.partitionBy(*partition_by)\n\n        # Write table\n        writer.saveAsTable(table_name)\n\n        # Apply properties\n        for key, value in DeltaConfig.DEFAULT_PROPERTIES.items():\n            spark.sql(f\"ALTER TABLE {table_name} SET TBLPROPERTIES ('{key}' = '{value}')\")\n```\n\n### Step 2: Data Quality Framework\n```python\n# src\u002Futils\u002Fquality.py\nfrom pyspark.sql import DataFrame\nfrom dataclasses import dataclass\nfrom typing import Callable\n\n@dataclass\nclass QualityCheck:\n    \"\"\"Data quality check definition.\"\"\"\n    name: str\n    check_fn: Callable[[DataFrame], bool]\n    severity: str = \"ERROR\"  # ERROR, WARNING, INFO\n\nclass QualityFramework:\n    \"\"\"Centralized data quality checks.\"\"\"\n\n    def __init__(self, spark):\n        self.spark = spark\n        self.checks: list[QualityCheck] = []\n        self.results: list[dict] = []\n\n    def add_check(self, check: QualityCheck):\n        \"\"\"Register a quality check.\"\"\"\n        self.checks.append(check)\n\n    def run_checks(self, df: DataFrame, table_name: str) -> bool:\n        \"\"\"Run all registered checks.\"\"\"\n        all_passed = True\n\n        for check in self.checks:\n            try:\n                passed = check.check_fn(df)\n                self.results.append({\n                    \"table\": table_name,\n                    \"check\": check.name,\n                    \"passed\": passed,\n                    \"severity\": check.severity,\n                })\n                if not passed and check.severity == \"ERROR\":\n                    all_passed = False\n            except Exception as e:\n                self.results.append({\n                    \"table\": table_name,\n                    \"check\": check.name,\n                    \"passed\": False,\n                    \"error\": str(e),\n                })\n                all_passed = False\n\n        return all_passed\n\n# Standard checks\ndef not_null_check(column: str) -> QualityCheck:\n    return QualityCheck(\n        name=f\"not_null_{column}\",\n        check_fn=lambda df: df.filter(f\"{column} IS NULL\").count() == 0,\n    )\n\ndef unique_check(columns: list[str]) -> QualityCheck:\n    cols = \", \".join(columns)\n    return QualityCheck(\n        name=f\"unique_{cols}\",\n        check_fn=lambda df: df.groupBy(columns).count().filter(\"count > 1\").count() == 0,\n    )\n\ndef range_check(column: str, min_val, max_val) -> QualityCheck:\n    return QualityCheck(\n        name=f\"range_{column}\",\n        check_fn=lambda df: df.filter(f\"{column} \u003C {min_val} OR {column} > {max_val}\").count() == 0,\n    )\n```\n\n### Step 3: Job Template\n```yaml\n# resources\u002Fjobs\u002Fetl_job_template.yml\nresources:\n  jobs:\n    ${job_name}:\n      name: \"${bundle.name}-${job_name}-${bundle.target}\"\n\n      tags:\n        domain: ${domain}\n        tier: ${tier}\n        owner: ${owner}\n        environment: ${bundle.target}\n\n      schedule:\n        quartz_cron_expression: ${schedule}\n        timezone_id: \"UTC\"\n\n      max_concurrent_runs: 1\n      timeout_seconds: ${timeout_seconds}\n\n      queue:\n        enabled: true\n\n      email_notifications:\n        on_failure: ${alert_emails}\n\n      health:\n        rules:\n          - metric: RUN_DURATION_SECONDS\n            op: GREATER_THAN\n            value: ${duration_threshold}\n\n      tasks:\n        - task_key: ${task_name}\n          job_cluster_key: ${cluster_key}\n          libraries:\n            - whl: ..\u002Fartifacts\u002Fdata_platform\u002F*.whl\n          notebook_task:\n            notebook_path: ${notebook_path}\n            base_parameters:\n              catalog: ${var.catalog}\n              schema: ${var.schema}\n              run_date: \"{{job.parameters.run_date}}\"\n```\n\n### Step 4: Monitoring Dashboard\n```sql\n-- Create monitoring views for operational dashboard\n\n-- Job health summary\nCREATE OR REPLACE VIEW data_platform.monitoring.job_health AS\nSELECT\n    job_name,\n    DATE(start_time) as run_date,\n    COUNT(*) as total_runs,\n    SUM(CASE WHEN result_state = 'SUCCESS' THEN 1 ELSE 0 END) as successes,\n    SUM(CASE WHEN result_state = 'FAILED' THEN 1 ELSE 0 END) as failures,\n    AVG(duration) \u002F 60000 as avg_duration_minutes,\n    MAX(duration) \u002F 60000 as max_duration_minutes\nFROM system.lakeflow.job_run_timeline\nWHERE start_time > current_timestamp() - INTERVAL 7 DAYS\nGROUP BY job_name, DATE(start_time);\n\n-- Data freshness tracking\nCREATE OR REPLACE VIEW data_platform.monitoring.data_freshness AS\nSELECT\n    table_catalog,\n    table_schema,\n    table_name,\n    MAX(commit_timestamp) as last_update,\n    TIMESTAMPDIFF(HOUR, MAX(commit_timestamp), current_timestamp()) as hours_since_update\nFROM system.information_schema.table_history\nGROUP BY table_catalog, table_schema, table_name;\n```\n\n## Data Flow Diagram\n\n```\n┌─────────────┐     ┌─────────────┐     ┌─────────────┐\n│   Sources   │────▶│  Ingestion  │────▶│   Bronze    │\n│ (S3, JDBC)  │     │ (Auto Loader│     │  (Raw Data) │\n└─────────────┘     │  DLT, APIs) │     └──────┬──────┘\n                    └─────────────┘            │\n                                               ▼\n                    ┌─────────────┐     ┌─────────────┐\n                    │   Silver    │◀────│  Transform  │\n                    │  (Cleansed) │     │   (Spark)   │\n                    └──────┬──────┘     └─────────────┘\n                           │\n                           ▼\n┌─────────────┐     ┌─────────────┐     ┌─────────────┐\n│   Serve     │◀────│    Gold     │◀────│  Aggregate  │\n│ (Warehouse, │     │ (Analytics) │     │   (Spark)   │\n│   APIs)     │     └─────────────┘     └─────────────┘\n└─────────────┘\n```\n\n## Instructions\n\n### Step 1: Initialize Project\n```bash\n# Clone template\ngit clone https:\u002F\u002Fgithub.com\u002Fdatabricks\u002Fbundle-examples.git\ncd bundle-examples\u002Fdefault-python\n\n# Customize for your project\nmv databricks.yml.template databricks.yml\n```\n\n### Step 2: Configure Environments\nSet up dev, staging, and prod targets in `databricks.yml`.\n\n### Step 3: Implement Pipelines\nCreate Bronze, Silver, Gold pipelines following medallion architecture.\n\n### Step 4: Add Quality Checks\nIntegrate data quality framework into each layer.\n\n## Output\n- Structured project layout\n- Medallion architecture implemented\n- Data quality framework integrated\n- Monitoring dashboards ready\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Circular dependencies | Wrong layering | Review medallion flow |\n| Config not loading | Wrong paths | Verify bundle includes |\n| Quality check failures | Bad data | Add data quarantine |\n| Schema drift | Source changes | Enable schema evolution |\n\n## Examples\n\n### Quick Setup Script\n```bash\n#!\u002Fbin\u002Fbash\n# Initialize reference architecture\n\nmkdir -p src\u002F{pipelines\u002F{bronze,silver,gold},ml,utils,notebooks}\nmkdir -p resources\u002F{jobs,dlt,clusters}\nmkdir -p tests\u002F{unit,integration}\nmkdir -p infrastructure\u002Fterraform\nmkdir -p docs\u002Frunbooks\n\n# Create initial files\ntouch src\u002Futils\u002F{__init__,delta,quality,logging}.py\ntouch resources\u002Fjobs\u002Fetl_jobs.yml\ntouch databricks.yml\n\necho \"Reference architecture initialized!\"\n```\n\n## Resources\n- [Databricks Architecture](https:\u002F\u002Fdocs.databricks.com\u002Flakehouse-architecture\u002Findex.html)\n- [Medallion Architecture](https:\u002F\u002Fwww.databricks.com\u002Fglossary\u002Fmedallion-architecture)\n- [Asset Bundles](https:\u002F\u002Fdocs.databricks.com\u002Fdev-tools\u002Fbundles\u002Findex.html)\n- [Unity Catalog Best Practices](https:\u002F\u002Fdocs.databricks.com\u002Fdata-governance\u002Funity-catalog\u002Fbest-practices.html)\n\n## Flagship Skills\nFor multi-environment setup, see `databricks-multi-env-setup`.\n",{"name":5,"author":47,"license":15,"version":48,"description":49,"allowed-tools":50},"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Implement Databricks reference architecture with best-practice project layout.\nUse when designing new Databricks projects, reviewing architecture,\nor establishing standards for Databricks applications.\nTrigger with phrases like \"databricks architecture\", \"databricks best practices\",\n\"databricks project structure\", \"how to organize databricks\", \"databricks layout\".\n","Read, Grep","main","90b50ed0778745a80fd5bfb13b1843d45b9e82f7","tests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fdatabricks-pack\u002Fskills\u002Fdatabricks-reference-architecture",233,"https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust","https:\u002F\u002Fgithub.com\u002FDicklesworthstone","https:\u002F\u002Fwww.jeffreyemanuel.com\u002F","Building in NY","2026-11-15 01:54:15",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add Dicklesworthstone\u002Fpi_agent_rust --skill databricks-reference-architecture",{"tool":66,"command":67},"bunx","bunx skills add Dicklesworthstone\u002Fpi_agent_rust --skill databricks-reference-architecture",{"tool":69,"command":70},"pnpm","pnpm dlx skills add Dicklesworthstone\u002Fpi_agent_rust --skill databricks-reference-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fdatabricks-pack\u002Fskills\u002Fdatabricks-reference-architecture\u002FSKILL.md",true,[],[75,109,143,165,191,217],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":80,"sourceHtmlUrl":81,"categories":82,"keywords":88,"publishedAt":108},"01M6FCR7G5A005P364Z6ZWCJDP","theme-factory","Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors\u002Ffonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FSKILL.md",[83],{"categoryNo":84,"categoryName":85,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",[89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107],"theme factory","factory","theme","docs","toolkit","generate","artifacts","SET","fly","slides","landing","html","styling","artifact","pages","themes","with","you","fonts","2026-11-11 15:11:14",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":113,"sourceHtmlUrl":114,"categories":115,"keywords":119,"publishedAt":42},"01M6FEGPPK0ZTKCCM0R3E3KS33","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[116],{"categoryNo":117,"categoryName":118,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000009","前端开发",[120,121,95,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,37,100,137,138,139,140,26,141,142],"web artifacts builder","web","artifacts builder","builder","frontend","css","components","react","component","routing","state management","state","shadcn","file","ui","Tools","Tailwind","single-file","simple","ui components","multi","jsx","suite",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":147,"sourceHtmlUrl":148,"categories":149,"keywords":154,"publishedAt":42},"01M6FEE9VTK1W4GY21AKREJXRG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[150,153],{"categoryNo":151,"categoryName":152,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":117,"categoryName":118,"taxonomyType":86,"taxonomyTypeDesc":87},[155,156,157,124,158,159,121,160,93,161,134,162,41,163,164,105,26],"testing","webapp testing","webapp","screenshots","playwright","debugging","browser","logs","behavior","local",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":169,"sourceHtmlUrl":170,"categories":171,"keywords":172,"publishedAt":42},"01M6FE20F7ZTQBFWKF4MPJ2SBX","neuropixels-analysis","Neuropixels neural recording analysis. Load SpikeGLX\u002FOpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen\u002FIBL curation, AI-assisted visual analysis, for Neuropixels 1.0\u002F2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FSKILL.md",[],[173,174,175,176,177,178,179,180,37,181,182,183,184,185,186,187,105,188,189,190,26,25],"analysis","neuropixels analysis","spike","metrics","data","open","quality","user","recordings","Neural","motion","visual","quality metrics","unit","sorting","curation","recording","load",{"skillNo":192,"name":193,"nameZh":6,"description":194,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":195,"sourceHtmlUrl":196,"categories":197,"keywords":201,"publishedAt":42},"01M6FDP0PDK6F1GGX395C7625Z","skill-creator","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FSKILL.md",[198],{"categoryNo":199,"categoryName":200,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000023","Skill与智能体开发",[202,203,204,205,206,207,208,209,210,211,212,213,214,215,105,26,216,25,24],"skill creator","creator","workflows","create","update","capabilities","knowledge","tool","integrations","specialized","guide","new skill","existing skill","users","Existing",{"skillNo":218,"name":219,"nameZh":6,"description":220,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":221,"sourceHtmlUrl":222,"categories":223,"keywords":225,"publishedAt":42},"01M6FDM8Y7VK7NYG9SM7QPA3PW","notebooklm","Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FSKILL.md",[224],{"categoryNo":199,"categoryName":200,"taxonomyType":86,"taxonomyTypeDesc":87},[219,226,227,228,229,230,231,161,232,233,37,234,235,236,237,26,238],"google","browser automation","gemini","automation","auth","code","library","management","only","document","query","Citation","source"]