ondatrasql

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2026 License: AGPL-3.0

README

OndatraSQL

OndatraSQL

The data runtime for teams that ship
Build pipelines without infrastructure.

One binary replaces ingestion, transformation, and orchestration.
No setup. No services. No stack.

Documentation · Discord · Blueprints


No Kafka. No Airflow. No dbt. No warehouse setup.

Just SQL files, one binary, and your data.

OndatraSQL is a data runtime that runs directly on DuckDB and DuckLake. You write SQL. OndatraSQL handles:

  • Execution order (no DAGs to define)
  • Change detection (no incremental logic)
  • Schema evolution (no migrations)
  • Validation and lineage (built-in)

Why

Most data tools assume you already have a stack. Kafka. Airflow. dbt. A warehouse.

OndatraSQL removes that assumption.

It runs on a single machine, requires no services, and works in minutes.

Install

curl -fsSL https://ondatra.sh/install.sh | sh

Windows: WSL2. From source: go install github.com/ondatra-labs/ondatrasql/cmd/ondatrasql@latest (Go 1.25+ and gcc/clang).

Quick Start

mkdir my-pipeline && cd my-pipeline
ondatrasql init

Create models/staging/orders.sql:

-- @kind: merge
-- @unique_key: order_id

SELECT * FROM (VALUES
    (1, 'Alice', 100, '2026-01-15'),
    (2, 'Bob',   200, '2026-02-20'),
    (3, 'Charlie', 150, '2026-03-10')
) AS t(order_id, customer, amount, order_date)

Run it:

ondatrasql run
[OK] staging.orders (merge, backfill, 3 rows, 180ms)

You now have a versioned table in DuckLake with automatic change tracking and a reproducible pipeline. No setup beyond this.

Principles

  • No DAGs — dependencies are inferred from SQL
  • No incremental logic — change detection is automatic
  • No infrastructure — runs on one machine
  • No blind runs — preview everything with sandbox

What You Don't Have to Do

No incremental logic — only changed data is processed automatically.

No migrations — schema updates itself when your query changes.

No blind runs — preview every change before committing.

No event infrastructure — POST events directly to an HTTP endpoint.

No separate tools for quality or lineage — built into execution.

Three Ways to Write Models

SQL — transformations:

-- @kind: table

SELECT date, SUM(total) AS revenue
FROM staging.orders GROUP BY date

Starlark — API ingestion (no Python):

# @kind: append

resp = http.get("https://api.example.com/users")
for user in resp.json:
    save.row(user)

YAML — declarative config:

kind: append
source: api_fetch
config:
  base_url: https://api.example.com

Mental Model

Files are tables. SQL is the pipeline. Runs are deterministic.

You don't build pipelines. You run data.

Compared to the Modern Data Stack

Traditional:

  • dbt for transforms
  • Airbyte for ingestion
  • Airflow for orchestration
  • Kafka for events
  • Snowflake for storage

OndatraSQL:

  • One binary
  • One runtime
  • One execution model

When Not to Use OndatraSQL

  • You need a distributed system
  • You process petabytes across clusters
  • You require real-time streaming

OndatraSQL is designed for simplicity over horizontal scale.

Commands

run [model]          Run pipeline or specific model
sandbox [model]      Preview changes safely
daemon               Start event collection
sql "SELECT ..."     Query your data
lineage overview     See all dependencies

Full CLI reference →

Documentation

ondatra.sh

Philosophy

The best data system is the one that runs now.

Not the one you finish setting up next week.

License

GNU AGPL v3

Directories

Path Synopsis
cmd
ondatrasql command
internal
backfill
Package backfill handles SQL hash calculation and backfill detection.
Package backfill handles SQL hash calculation and backfill detection.
collect
Package collect provides durable event buffering backed by Badger.
Package collect provides durable event buffering backed by Badger.
config
Package config handles configuration and paths.
Package config handles configuration and paths.
dag
Package dag builds and sorts a directed acyclic graph of model dependencies.
Package dag builds and sorts a directed acyclic graph of model dependencies.
duckdb
Package duckdb provides an embedded DuckDB session using go-duckdb.
Package duckdb provides an embedded DuckDB session using go-duckdb.
execute
Package execute provides batch query capabilities for run_type decisions.
Package execute provides batch query capabilities for run_type decisions.
git
Package git provides utilities for extracting Git repository metadata.
Package git provides utilities for extracting Git repository metadata.
lineage
Package lineage provides column-level lineage tracking and visualization.
Package lineage provides column-level lineage tracking and visualization.
output
Package output provides structured JSON output support.
Package output provides structured JSON output support.
parser
Package parser handles SQL model file parsing.
Package parser handles SQL model file parsing.
script
Package script provides a Starlark-based scripting runtime for data pipelines.
Package script provides a Starlark-based scripting runtime for data pipelines.
sql
Package sql provides embedded SQL files for OndatraSQL operations.
Package sql provides embedded SQL files for OndatraSQL operations.
testutil
Package testutil provides shared test helpers.
Package testutil provides shared test helpers.
validation
Package validation converts constraint/audit directives to SQL.
Package validation converts constraint/audit directives to SQL.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL