Skip to content

Source landing semantics

Some sources—especially API and SaaS connectors—declare how each namespace’s data must land in the warehouse. Skipprd calls this a namespace contract. Contracts are separate from column types discovered by skipprd discover.

Namespace contracts

For every table (namespace) a source can emit, the source plugin publishes a contract that includes:

FieldMeaning
Primary keyLogical row identity (business dimensions plus identifiers such as property_id and date)
Partition keyColumns that define a physical slice for partition-scoped writes (often date for daily reports)
Write policyHow the configured data sink must apply each batch
Refresh windowOptional number of days to re-fetch before the checkpoint (for APIs that revise past days)
SemanticsDescriptor such as mutable_report (informational)

The host validates contracts when a source starts and checks that your pipeline’s data sink supports every declared write policy.

Write policies

PolicyUse when
appendRows are immutable or append-only
merge_by_keyCurrent state by business key (sink must support merge)
replace_partitionA partition can be fully rewritten when numbers change
replace_tableSmall, bounded full snapshots

Mutable reports: APIs like GA4 can change metrics for dates you already synced. replace_partition tells the sink to drop and rewrite the partition for the batch’s partition key values (for example date=2024-01-15) before writing new Parquet.

Lookback / refresh window: The source re-pulls the last N days on each run (lookback_days in GA4). Checkpoints record progress; they are not a substitute for the correct write policy.

Destination pairing

Data sinkreplace_partition
Athena (S3 + Glue)Yes
IcebergYes
Append-only sinksNo — pipeline validation fails

Discover vs contracts

LayerControls
Namespace contractHow batches land
Arrow / discovered schemaColumn names and types

Example: Google Analytics 4

See Google Analytics (GA4) input and Athena output.

For plugin authors, see API / SaaS source plugins.

This site is source-available under PolyForm Shield 1.0.0