Fix temporal partition resolution when source column has multiple dimension links#2052
Merged
shangyian merged 1 commit intoDataJunction:mainfrom Apr 24, 2026
Merged
Conversation
✅ Deploy Preview for thriving-cassata-78ae72 canceled.
|
c88601a to
6762475
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.
Summary
This PR fixes temporal partition resolution when a column has multiple dimension links. The issue was that
get_temporal_partitionscollapsed the source-column to dimension attribute mapping into a single-valued dict, so when the same FK column (e.g.,region_date) was referenced by multiple dimension links (e.g., one simple and one multi-column), only the last link survived.If the user selected the other link's dimension attribute in the cube grain, the temporal partition output column was left as the source name, causing materialization to fail with:
The change now iterates over every candidate dimension attribute and picks the first one that matches grain columns.
Test Plan
Added a new
TestGetTemporalPartitionsMultipleDimLinksthat constructs a fact with both link shapes sharingregion_dateand verifies output name resolves todateint.make checkpassesmake testshows 100% unit test coverageDeployment Plan