Summary
Track a proposal to improve how strategy-selection parameters (e.g. --incremental-strategy, --full-refresh) are validated and honoured for filesystem-family sources (local, s3, gcs, sftp), as raised in #137.
Background
From the discussion in #137 (comment by @hampsterx):
Because filesystem sources override incremental_strategy to none, an explicit --incremental-strategy flag is currently swallowed: append becomes a no-op and replace is unreachable through that flag (only --full-refresh can reset the destination). Two complications noted:
replace is also the current default strategy value, and the run only sees the resolved value, not whether the flag was explicitly passed. So "keep append as the default but honour an explicit replace" requires a was-provided sentinel; simply dropping the override would flip these sources to replace-by-default unintentionally.
- Any fix must be scoped to the filesystem family (or gated on a source capability), since several handled SaaS/streaming sources set their own resource-level
merge/replace dispositions, and a run-level disposition would override those.
@amotl additionally suggested considering a broader channelling/validation layer for such parameters based on pydantic, potentially across all pipeline elements, as a longer-term direction (kept here as context, not a hard requirement).
Task
- Design a mechanism to detect whether
--incremental-strategy was explicitly provided by the user (vs. defaulted), scoped to filesystem sources.
- Honour an explicit
replace/append value from --incremental-strategy for filesystem sources without breaking the append-by-default behaviour.
- Ensure the fix does not affect other sources that set their own resource-level
merge/replace dispositions.
- Optionally evaluate introducing pydantic-based validation for pipeline parameters as a longer-term follow-up.
Acceptance criteria
- Explicit
--incremental-strategy replace (or append) works as expected for filesystem sources.
- Default behaviour (append on re-run,
--full-refresh for reset) is preserved when the flag is not passed.
- No regression for non-filesystem sources with resource-level dispositions.
References
Requested by: @amotl
Summary
Track a proposal to improve how strategy-selection parameters (e.g.
--incremental-strategy,--full-refresh) are validated and honoured for filesystem-family sources (local, s3, gcs, sftp), as raised in #137.Background
From the discussion in #137 (comment by @hampsterx):
Because filesystem sources override
incremental_strategytonone, an explicit--incremental-strategyflag is currently swallowed:appendbecomes a no-op andreplaceis unreachable through that flag (only--full-refreshcan reset the destination). Two complications noted:replaceis also the current default strategy value, and the run only sees the resolved value, not whether the flag was explicitly passed. So "keep append as the default but honour an explicitreplace" requires a was-provided sentinel; simply dropping the override would flip these sources to replace-by-default unintentionally.merge/replacedispositions, and a run-level disposition would override those.@amotl additionally suggested considering a broader channelling/validation layer for such parameters based on pydantic, potentially across all pipeline elements, as a longer-term direction (kept here as context, not a hard requirement).
Task
--incremental-strategywas explicitly provided by the user (vs. defaulted), scoped to filesystem sources.replace/appendvalue from--incremental-strategyfor filesystem sources without breaking the append-by-default behaviour.merge/replacedispositions.Acceptance criteria
--incremental-strategy replace(orappend) works as expected for filesystem sources.--full-refreshfor reset) is preserved when the flag is not passed.References
Requested by: @amotl