Derive partition_date for composite keys with one temporal dimension#68442
Merged
Conversation
311e36f to
8b606b1
Compare
phanikumv
reviewed
Jun 16, 2026
uranusjr
approved these changes
Jun 17, 2026
amoghrajesh
approved these changes
Jun 17, 2026
8b606b1 to
1f37325
Compare
ProductMapper.to_partition_date now inspects each child mapper's segment: exactly one non-None temporal anchor is returned; zero or multiple temporal children (ambiguous) return None, matching the scheduler's leave-unset rule. Also fixes _handle_clear_run to forward info.partition_key to BackfillDagRun, consistent with all six other creation sites in that file.
1f37325 to
e414a81
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
ProductMapperlacked ato_partition_dateimplementation, so backfill Dag runs built from composite partition keys (e.g.date|region) never hadpartition_dateset — even when exactly one dimension was temporal. A separate gap in_handle_clear_rundroppedpartition_keywhen creating theBackfillDagRunon the clear/reprocess path, while all other creation sites in that file already forwarded it.What
ProductMapper.to_partition_date: splits the downstream key by delimiter, delegates to each child mapper, returns the single non-Noneanchor. Zero temporal children, two-or-more temporal children, and segment-count mismatch all returnNone._handle_clear_runinbackfill.py: addspartition_key=info.partition_keyso the clear path matches the other sixBackfillDagRuncreation sites.Was generative AI tooling used to co-author this PR?
Generated-by: Claude following the guidelines
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.