From 9e9c35dade4138c8eaf60da5e751a587c39e5b4f Mon Sep 17 00:00:00 2001 From: JamieDeMaria Date: Tue, 30 Jan 2024 10:25:41 -0500 Subject: [PATCH] add partition_time_window to DI context --- .../dagster/dagster/_core/execution/context/invocation.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python_modules/dagster/dagster/_core/execution/context/invocation.py b/python_modules/dagster/dagster/_core/execution/context/invocation.py index 3e27abb7dcbe9..9254cf5196642 100644 --- a/python_modules/dagster/dagster/_core/execution/context/invocation.py +++ b/python_modules/dagster/dagster/_core/execution/context/invocation.py @@ -635,6 +635,10 @@ def asset_partitions_time_window_for_output(self, output_name: str = "result") - Union[MultiPartitionsDefinition, TimeWindowPartitionsDefinition], partitions_def ).time_window_for_partition_key(self.partition_key) + @property + def partition_time_window(self) -> TimeWindow: + return self.asset_partitions_time_window_for_output() + def add_output_metadata( self, metadata: Mapping[str, Any],