Correctness knobs
Settings that control what data lands in the destination: incremental strategy, primary key, type hints, interval bounds, and column masking.
These settings (knobs) control what reaches the destination. Incorrect settings can result in incorrect data.
incremental_strategy (sink)
sink.options
required, no default
replace, append, merge
How repeated runs interact with the destination table.
replace
Small lookup tables, controlled snapshots, pre-production backfills
Drops and re-creates the destination table on every run.
append
Immutable / event-style data, logs, events, history, telemetry
Adds new rows; never updates or deletes.
merge
Mutable entity tables, customers, subscriptions, orders, accounts
Upserts on primary_key. Requires a stable primary key in the source.
Some destinations restrict the supported set. See Destinations for per-destination strategy support. The most common surprises:
MongoDB destination: supports
replaceandmergeonly,appendis explicitly rejected.Elasticsearch destination: supports
replaceonly, drop-and-recreate-index semantics.AWS S3 file-system destination: supports
replaceandappend.replacerequiress3:DeleteObjectIAM permission.
Example: append
spec:
type: batch
source:
address: postgresql://user:pass@host:5432/app
options:
source_table: public.events
incremental_key: event_time
sink:
address: dataos://lakehouse
options:
dest_table: raw.events
incremental_strategy: appendExample: merge
Example: replace
incremental_key (source)
source.options
unset
string (column name)
Tells Nilus which column represents "newness" so each run can extract only the rows that have appeared or changed since the last successful run.
Prefer
updated_atfor mutable tables.Prefer
created_ator event time for append-only datasets.The column must be monotonically increasing in the source. Rows mutated without their
updated_atbeing touched will be missed.The column should be indexed in the source database. Un-indexed scans are the most common cause of slow incremental runs.
Recommended type:
timestamp,datetime,date, or a sequence-backed integer.Write the source column name (
LastModifiedDate), not the snake_cased destination name.Some SaaS sources reject
incremental_keyand manage incrementality themselves. Stripe uses:sync:incrementaloncreatedonly. Status, refund, and dispute updates on older charges are not picked up. See Stripe.
primary_key (source)
source.options
unset (required for merge)
string (column name)
Identifies the logical row. Used by incremental_strategy: merge to decide whether an inbound row is an insert or an update.
Start with one stable business key, typically
id. Write the source column name (OrderId), not snake_case.Avoid composite keys unless the source model genuinely requires it.
Table reads can pick up a table primary key during schema reflection.
query:cannot, so setprimary_keyexplicitly.If the source has no reliable row identifier, do not use
merge. Omitting the key does not fail the run. It falls back to append.
type_hints (source)
source.options
inferred
object map (column_name: <type>)
Overrides Nilus' automatic type inference when the source's declared type is ambiguous or operationally important. Each entry is column_name: <type>. Supported types:
text, bigint, bool, timestamp, date, decimal, double, binary, json, time.
Hint ambiguous columns and sparse columns that can be all-null on early extraction pages. Hinting columns the source already declares correctly, and that always have values, adds no value and increases the chance of a future schema-drift mismatch.
A sparse column, such as a deleted_utc timestamp that is null on every early page, can be dropped from the inferred schema before a later page has a value. Pin it:
That keeps the column in the destination even when this run never sees a non-null. See Schema evolution.
decimal pins the logical type only. It does not set Iceberg precision or scale. A query: extract from any SQL batch source into a DataOS Lakehouse still lands decimals as decimal(38,9). Use a table read if you need the source precision and scale. Do not switch extract styles on the same dest_table. See Schema evolution.
interval_start / interval_end (source)
source.options
unset
ISO-8601 string
Bounded extraction window. Both bounds are optional and independent. Set one or both. Useful for one-off backfills, replays, or windowed catch-up runs.
When set in addition to incremental_key, the incremental cursor is constrained to [interval_start, interval_end]. Without incremental_key, these bounds have no effect.
mask (source)
source.options
unset
object map (column_name: algorithm[:param])
Column-level data masking applied during extraction. Use it to hash or redact PII before the data hits the sink.
Supported algorithms include hash, partial:<n>, and redact. The full list is enumerated in the per-connector pages where masking has connector-specific implications.
SCHEMA_NAMING (env)
Runtime env (spec.use.projection.projections.envVars)
default
default, direct
Controls whether Nilus normalizes destination table and column identifiers, or preserves the source names. Nilus reads this from the SCHEMA_NAMING environment variable only. It is not a source.options key. The domain schema rejects unknown source options, so schema_naming: under source.options fails apply.
default
Apply Nilus naming conventions (snake_case, identifier cleanup).
pkey → p_key, CustomerID → customer_id
direct
Keep source table and column names as they appear in the source.
pkey stays pkey, CustomerID stays CustomerID
Use direct when downstream queries, reports, or applications depend on the original names. Leave the default when you want a consistent, SQL-friendly identifier style.
Last updated
Was this helpful?