Sources
Sources
Postgres tables, Postgres changes, files in S3 or a folder, and Python sources: the kinds of source and the settings they share.
A source is where data comes from. SQLLoad has four kinds:
kind |
Reads | Tables | Declared in |
|---|---|---|---|
postgres |
Tables of a Postgres database, with binary COPY |
One per matching source table | sqlload.toml |
postgres_cdc |
A Postgres database’s inserts, updates and deletes, from a logical replication slot, after a first snapshot | One per matching source table | sqlload.toml |
files |
Parquet, CSV, JSON or NDJSON files in S3 or a local folder | One per source | sqlload.toml |
| Python | Whatever a Python function yields: dicts, Arrow data, JSON bytes, HTTP jobs | One per decorated function | Python, under python_paths |
Every source loads into a target: its destination, or the project’s default_target. Settings
that shape tables (write_strategy, unique_key, cursor_column and the rest) can be set on the
source as defaults for all its tables, and per table. See
sqlload.toml for the full list.
Each kind has its own page:
- Postgres: choosing tables and columns, masking, and how tables are read.
- Postgres changes: streaming changes from a replication slot into DuckDB, Snowflake or Parquet files, on a schedule or continuously, and what to watch on the server.
- Files: formats, partitions, which files load, and files the destination reads itself.
- Python: any API, SaaS or custom source as a table, including REST APIs that run entirely in Rust.