Chris Evans
08/23/2021, 3:46 PM"{{ ds }}"
to get the execution timestamp of a DAG. The only way I could come up w/ to something similar was with the below code which requires run storage. I’m curious if there is a simpler way to obtain this information?
from dagster import pipeline, repository, schedule, solid
from dagster.core.storage.pipeline_run import PipelineRunsFilter
@solid
def hello(context):
filter = PipelineRunsFilter(run_ids=[context.run_id])
run_record = context.get_step_execution_context().instance.run_storage.get_run_records(filters=filter)
Yassine Marzougui
08/23/2021, 4:48 PMstats = context.instance.event_log_storage.get_stats_for_run(context.run_id)
The execution date would be stats.launch_time
and the start date would be stats.start_time
.Chris Evans
08/23/2021, 6:10 PM