Summary
The .datasource format supports BACKFILL skip, but the Python SDK does not expose an equivalent option in Data Source resource definitions.
This came up while adapting the Forward docs to show CLI, TypeScript SDK, and Python SDK examples side by side. The BACKFILL skip example can only be documented for .datasource files today.
Current state
A repo/source check found no backfill, skip_backfill, backfill_skip, or BACKFILL support in the Python SDK:
DatasourceOptions does not include a backfill-related field.
- The datasource generator does not emit
BACKFILL skip.
- The datasource parser/migration code does not recognize
BACKFILL.
- A repo-wide search for
backfill returned no matches.
Current DatasourceOptions fields are limited to options like schema, description, engine, tokens, shared_with, json_paths, forward_query, indexes, kafka, s3, and gcs.
Requested behavior
Add SDK support for the .datasource directive:
Suggested API shape, open to whatever fits the SDK conventions:
daily_page_visits = define_datasource("daily_page_visits", {
"schema": {
"date": t.date(),
"page_url": t.string(),
"visits": t.uint64(),
},
"engine": engine.summing_merge_tree({
"sorting_key": ["date", "page_url"],
}),
"backfill": "skip",
})
Expected generated .datasource output should include:
Why
BACKFILL skip is needed to create a new Data Source that is the destination of a Materialized View without backfilling historical data from the Materialized View query. Without SDK support, SDK users cannot represent the same deployment behavior as .datasource users.
Summary
The
.datasourceformat supportsBACKFILL skip, but the Python SDK does not expose an equivalent option in Data Source resource definitions.This came up while adapting the Forward docs to show CLI, TypeScript SDK, and Python SDK examples side by side. The
BACKFILL skipexample can only be documented for.datasourcefiles today.Current state
A repo/source check found no
backfill,skip_backfill,backfill_skip, orBACKFILLsupport in the Python SDK:DatasourceOptionsdoes not include a backfill-related field.BACKFILL skip.BACKFILL.backfillreturned no matches.Current
DatasourceOptionsfields are limited to options likeschema,description,engine,tokens,shared_with,json_paths,forward_query,indexes,kafka,s3, andgcs.Requested behavior
Add SDK support for the
.datasourcedirective:Suggested API shape, open to whatever fits the SDK conventions:
Expected generated
.datasourceoutput should include:Why
BACKFILL skipis needed to create a new Data Source that is the destination of a Materialized View without backfilling historical data from the Materialized View query. Without SDK support, SDK users cannot represent the same deployment behavior as.datasourceusers.