From 0fc16361a9ef81aa1701cd15d75d64c84e010d37 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 ca3b80c1e630e..6962fe76caa76 100644 --- a/python_modules/dagster/dagster/_core/execution/context/invocation.py +++ b/python_modules/dagster/dagster/_core/execution/context/invocation.py @@ -646,6 +646,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],