Concepts

On this page

How OndatraSQL works.

  • Models: every model is a SQL file that produces one table
  • Model Kinds: table, append, merge, tracked, scd2
  • Lib Functions: API dict for inbound fetch and outbound push
  • Change Detection: process only changed data via DuckLake snapshots
  • Incremental Models: cursor-based loading for SQL and lib functions
  • Schema Evolution: additive and destructive changes without migration
  • Dependency Graph: automatic execution order from SQL references
  • Outbound Sync: why commit-first and at-least-once delivery
  • State: the push queue, fetch staging, and OAuth tokens — separate from DuckLake
  • Validation: constraints, audits, and warnings at three stages
Models

A model is a SQL file that produces one table. The file path is the table name, directives control behavior, and lib functions handle API data.

Lib Functions

Why transport logic lives in lib/ as Starlark functions, separate from SQL models.

Model Kinds

Why OndatraSQL has five model kinds and when to choose each one.

Change Detection

How OndatraSQL uses DuckLake snapshots to process only changed data. AST-level query rewriting, join handling, and skip detection.

Schema Evolution

How OndatraSQL handles schema changes automatically when your model SQL changes.

Incremental Models

Why OndatraSQL uses cursor-based incrementality, how it interacts with CDC, and what the tradeoffs are.

Dependency Graph

How OndatraSQL builds and executes the dependency graph automatically from your SQL.

Validation

Why OndatraSQL validates data at three stages and why each stage exists.

Outbound Sync

Why OndatraSQL commits data before pushing to external systems, and what that means for your push function.

State

How OndatraSQL stores operational state — the push queue, fetch staging buffer, and OAuth refresh tokens — separately from your DuckLake data.