Abhinav Dhulipala
08/09/2023, 3:55 PMbuild_asset_context(
partition_key_range=PartitionKeyRange(datetime.now() - timedelta(days=1), datetime.now())
)
But I keep running into
E AttributeError: 'BoundOpExecutionContext' object has no attribute '_step_execution_context'. Did you mean: 'get_step_execution_context'?
venv/lib/python3.10/site-packages/dagster/_core/execution/context/compute.py:295: AttributeError
I also tried creating a super class with this attribute set as such
class CustomAssetExecutionContext(AssetExecutionContext):
def __init__(self, step_execution_context: StepExecutionContext):
super().__init__(step_execution_context)
def partition_time_window(self) -> TimeWindow:
return TimeWindow(datetime.now() - timedelta(days=1), datetime.now())
But I"m unable to construct a step_execution_contextSean Lopp
08/09/2023, 7:27 PMexecute_in_process
with tags to achieve this type of test. Here is an example: https://github.com/dagster-io/hooli-data-eng-pipelines/blob/master/hooli_data_eng_tests/test_assets.py#L29-L50Abhinav Dhulipala
08/09/2023, 7:28 PM