Skip to main content
ingestr is an open-source CLI tool by Bruin that copies data from any source to any destination using a single command. SQLBuild integrates with ingestr as a declarative source loader - you configure the ingestion directly in your source YAML, and SQLBuild handles execution as part of the build lifecycle.

Install

This installs ingestr alongside SQLBuild. The ingestr CLI must be available on PATH.

How it works

  1. Declare an ingestr block on a source in sources/*.yml
  2. SQLBuild generates a synthetic loader that calls ingestr ingest as a subprocess
  3. ingestr reads from the configured source and writes directly to the SQLBuild adapter’s database
  4. The destination URI is built automatically from your SQLBuild connection config - no manual destination setup
No Python loader code is needed. The YAML declaration is the entire configuration.
sqb build loading three external (ingestr) sources (raw_customers, raw_orders, raw_payments); the raw_customers step shows the ingestr ingest command, pipeline source/destination, and an ingestion metrics table before the models build

Example: PostgreSQL to DuckDB

Replicate a table from PostgreSQL into your local DuckDB project:
That’s it. Run sqb load or sqb build and ingestr copies the orders table into your project.

Example: Stripe with incremental merge

Load Stripe charges with incremental merge on a primary key:
On subsequent runs, ingestr merges new and updated records based on the id column, using created to detect changes.

Configuration reference

The ingestr block on a source supports the following fields:

Strategy mapping

Template variables

All string fields in the ingestr block support SQLBuild project variable substitution and context templates:
Variables are resolved from the project’s merged variable config (project + target + local). Set sensitive values in sqlbuild_local.toml (gitignored):

Destination URI

SQLBuild automatically builds the ingestr destination URI from your adapter connection config. All supported adapters work without manual destination configuration:

Reload

When --reload is passed, ingestr runs with --full-refresh, forcing a complete reload regardless of the configured strategy:

Build integration

ingestr sources are managed sources - they participate in the same lifecycle as Python loaders:
See Loaders for details on auto-load behavior, source deferral, and the --load / --no-load / --reload flags.

Supported sources

ingestr supports 50+ sources including databases, SaaS APIs, and file systems. See the ingestr documentation for the full list of supported sources and their URI formats.