Jaco van der Laan
Active filters:Data Engineering ×Clear all

CTE Normalization & UNION Handling — Making Derived Queries First-Class Metadata Citizens

Why Derived Queries Must Be Modeled — Not Rendered Most SQL complexity does not live in base tables. It lives in: CTEs Subqueries UNION chains Nested derived queries In many data platforms, these constructs are treated as textual blocks. Parsed. Rendered. Forgotten. MDDE treats them differently. Derived queries are modeled as entities. Not as strings. Consider: WITH filtered_orders AS ( SELECT * FROM orders WHERE order_date >= '2024-01-01' ), aggregated_orders AS ( SELECT customer_id, COUNT(*)...
Read more

Join Reordering & Structural Optimization — When Metadata Becomes an Optimization Surface

Structural normalization and determinism SQL optimizers inside databases already reorder joins. So why would a metadata-driven framework care? Because there are two very different concerns: Runtime execution optimization (handled by the database engine) Structural normalization and determinism (handled by MDDE) These are not the same problem. MDDE does not attempt to replace the database optimizer. It ensures that the structural representation of joins is: Explicit Deterministic Canonical Traceable Before SQL ever reaches execution. In real...
Read more

The Hidden Danger of Non-Deterministic SQL

Why Your Queries May Return Different Results Every Time — And Why It Matters Recently, a data team spent several days investigating what appeared to be a serious defect. Their validation tests kept failing. The same query produced different results in different runs. After careful analysis, they uncovered the real root cause: SELECT customer_id, region, ROW_NUMBER() OVER (PARTITION BY region) AS rn FROM customers The migration was correct. The SQL was broken. Without an ORDER...
Read more

The MDDE Metadata Schema — 60+ Tables That Make Architecture Executable

The Architecture Itself Becomes Queryable Most data platforms are built on SQL. MDDE is built on metadata. Not documentation metadata. Not optional annotations. Structured, relational metadata that describes: Entities Attributes Relationships Transformations Lineage Quality rules Optimizer findings Deployment behavior In other words: The architecture itself becomes queryable. This article explains the schema that makes that possible. When SQL is parsed into MDDE, it is not stored as text blobs. It is decomposed into: Entities Attributes...
Read more

Automation Scripts — One-Click Pipelines for Model Management

Every Model Workspace Generates Automation Scripts Most frameworks fail not because they lack features. They fail because they add friction. If engineers must remember five CLI commands, configure paths manually, or guess the correct sequence of steps — adoption slows down. MDDE was built under migration pressure. Which means: Workflows had to be repeatable. Deterministic. Low-friction. And safe. That is why every model workspace generates automation scripts. In a typical metadata-driven workflow, you need to:...
Read more

Inside the MDDE Engine — Optimizer Passes, Diagnostics, and Deterministic Generation

MDDE is not just a metadata repository Most articles talk about modeling. Few talk about engines. MDDE is not just a metadata repository. It is an engine composed of: Parser layer Metadata writer Optimizer pipeline Proposal system SQL generator Diagnostics framework Let’s look inside. Each optimizer pass follows the same contract: def run(model_id: str, db: Connection) -> OptimizationReport: ... Each pass: Scans metadata Detects patterns Emits diagnostics Optionally produces proposals Never mutates blindly Diagnostics are...
Read more

Data Quality as Metadata — Checks, Profiles, and Contracts Derived From Structure

Treat quality rules as metadata Most data quality implementations begin with queries. SELECT COUNT(*) FROM customer WHERE customer_id IS NULL; Or: SELECT customer_id, COUNT(*) FROM customer GROUP BY customer_id HAVING COUNT(*) > 1; Useful, but fragile. Why? Because quality logic is: Buried in SQL files Scattered across projects Not centrally visible Difficult to propagate Often forgotten during migration MDDE approaches data quality differently. It treats quality rules as metadata. Not as ad-hoc SQL. When metadata...
Read more

Write Once, Deploy Anywhere (Without Losing Semantics) — Multi-Dialect DDL Generation

Metadata-First DDL Generation. Most data platforms are not single-dialect anymore. In modern environments, you often see: Snowflake for analytics Databricks for processing BigQuery for BI DuckDB for local experimentation PostgreSQL for operational workloads And sometimes all of them in the same organization. The question becomes: How do you keep structural consistency across platforms without rewriting everything? MDDE approaches this through metadata-first DDL generation. Consider a simple table: CREATE TABLE customer ( customer_id VARCHAR(50) NOT NULL,...
Read more

Observations and Proposals — How MDDE Suggests Improvements Without Forcing Change

Lifecycle Traceability Many frameworks fail at the same point: They confuse detection with enforcement. They detect a pattern… …and immediately try to fix it. That works in greenfield projects. It fails in production systems. MDDE takes a different stance: Observe first. Propose second. Act only when approved. This separation is deliberate. In real systems: Queries contain historical edge cases Performance optimizations exist for specific reasons Workarounds hide migration constraints Naming inconsistencies have downstream dependencies If...
Read more

From dbt to MDDE — Bridging Code-First and Metadata-First Approaches

Bridging Code-First and Metadata-First Approaches For many teams, dbt is the modern data stack. It provides: Clean SQL-based transformations Dependency graphs Tests and documentation Developer-friendly workflows It has raised the quality bar across the industry. So if dbt works — why introduce something like MDDE? The answer is not replacement. It’s enrichment. dbt is unapologetically code-first. Models are defined as SQL files. Structure is inferred. Documentation and tests are attached via YAML. It works beautifully...
Read more
1 2 3 4 5 … 21