05-schema-validation

Validate DataFrame columns against target Delta table DDL schemas before merge operations.

1|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/prashsub/vibe_coding_lakehouse_starter_repo --skill 05-schema-validation-prashsub
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 05-schema-validation
Source: https://github.com/prashsub/vibe_coding_lakehouse_starter_repo/tree/main/data_product_accelerator/skills/gold/pipeline-workers/05-schema-validation
Command: npx skills add https://github.com/prashsub/vibe_coding_lakehouse_starter_repo --skill 05-schema-validation-prashsub

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill prevents common Gold layer bugs caused by schema mismatches between DataFrames and target Delta tables, ensuring data quality and preventing deployment failures.

Core Features & Use Cases

  • Runtime Schema Validation: Compares DataFrame columns against actual DDL schemas before merge operations.
  • DDL as Source of Truth: Enforces that the live table schema is the definitive source, not design specifications.
  • Use Case: When writing a script to merge updated customer data into the dim_customer Gold table, this Skill will automatically verify that the input DataFrame contains all required columns and no extraneous ones, preventing UNRESOLVED_COLUMN errors.

Quick Start

Use the 05-schema-validation skill to validate the schema of the updates DataFrame against the target Gold table 'dim_user' in the 'dev_catalog.dev_schema' schema.

Frequently Asked Questions about 05-schema-validation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent schema mismatch errors during Delta Lake merge operations?

Prevent schema mismatch errors by performing runtime schema validation that compares DataFrame columns against target DDL schemas before executing Delta Lake merge operations, catching column discrepancies before deployment.

Why does my Gold layer merge script fail with UNRESOLVED_COLUMN errors?

Gold layer merge scripts fail with UNRESOLVED_COLUMN errors when DataFrame columns do not align with the target table DDL schema, requiring runtime validation to detect extraneous or missing columns before deployment.

How do I validate a DataFrame against a DDL schema before merging?

Validate a DataFrame against a DDL schema by using helper functions to enforce the live table schema as the source of truth, automatically verifying that input columns match required DDL specifications before merge execution.

What causes schema drift in Delta Lake Gold layer tables?

Schema drift in Gold layer tables is caused by mismatches between design specifications and actual table structures, which you can prevent by adopting a DDL-first workflow that treats the live table schema as the definitive source.

Can I check for extraneous columns before merging data into a Gold table?

Yes, you can check for extraneous columns by running runtime schema validation that verifies input DataFrames contain only the required columns defined by the target Gold table DDL schema, preventing unexpected merge failures.

Does schema validation work with existing Delta Lake merge scripts?

Yes, schema validation works with existing Delta Lake merge scripts by applying helper functions to validate DataFrame columns against DDL schemas at runtime, ensuring data integrity without requiring design specification changes.