-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multi-partitioning in AssetSlice #20353
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
90a0736
to
aa23d4e
Compare
986f0ed
to
a530f5d
Compare
aa23d4e
to
0c64516
Compare
a530f5d
to
02f35a4
Compare
0c64516
to
fb2c810
Compare
d3ecbbf
to
14e6b97
Compare
python_modules/dagster/dagster/_core/asset_graph_view/asset_graph_view.py
Outdated
Show resolved
Hide resolved
|
||
def _get_multi_dim_info(self) -> "MultiDimInfo": | ||
check.inst(self._partitions_def, MultiPartitionsDefinition) | ||
assert isinstance(self._partitions_def, MultiPartitionsDefinition) # appease pyright |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[1]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multi_dim_info = self._get_multi_dim_info() | ||
last_tw = multi_dim_info.tw_partition_def.get_last_partition_window( | ||
self._asset_graph_view.effective_dt | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is going to become a core part of the system, IMO we should put the necessary time window dimension accessors on MultiPartitionsDefinition
instead of having this one-off MultiDimInfo
class.
EDIT: Looks like you did actually add to MultiPartitionsDefinition
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just added some helper methods to MultiPartitionsDefinition
. I think we should add to the core layer in a follow up, alongside an effort to represent multi-partioning in the underlying PartitionsSubset
more efficiently.
fb2c810
to
aa748ae
Compare
14e6b97
to
d73cb65
Compare
aa748ae
to
5bfd3c4
Compare
d73cb65
to
109372a
Compare
5bfd3c4
to
8e151ba
Compare
109372a
to
c8e57dd
Compare
8e151ba
to
1d2e500
Compare
c8e57dd
to
38c8b37
Compare
1d2e500
to
c2d6e90
Compare
38c8b37
to
2cc13a9
Compare
5a89498
to
fdc715f
Compare
e23ea96
to
52bf7bd
Compare
fdc715f
to
1077b0d
Compare
7e8c5cb
to
905ef8a
Compare
9e70a03
to
b0423d4
Compare
905ef8a
to
39ac36c
Compare
39ac36c
to
bbaf547
Compare
## Summary & Motivation Support multi-partioning in `AssetSlice`. The most notable business logic here is the treatment of the "latest" time window and time windows. Notably this code is aware of whether or not the underlying multi partition definition has a time-windowed partition. If so, methods like latest time window return the full set of partions resident in the _other_ partition dimension affiliated with with the time. ## How I Tested These Changes BK
Summary & Motivation
Support multi-partioning in
AssetSlice
.The most notable business logic here is the treatment of the "latest" time window and time windows. Notably this code is aware of whether or not the underlying multi partition definition has a time-windowed partition. If so, methods like latest time window return the full set of partions resident in the other partition dimension affiliated with with the time.
How I Tested These Changes
BK