From b56761f0a8dcb61d783cc7b8dde0605a5ccdf9b5 Mon Sep 17 00:00:00 2001 From: JamieDeMaria Date: Fri, 26 Jan 2024 15:05:10 -0500 Subject: [PATCH] add time window to DI contexts --- .../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 c282e7915d215..96fb6b5f7c962 100644 --- a/python_modules/dagster/dagster/_core/execution/context/invocation.py +++ b/python_modules/dagster/dagster/_core/execution/context/invocation.py @@ -617,6 +617,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],