Yesterday, we shipped an off-cycle bonus release, 2.7.12. In addition to squashing a few bugs, the release included a highly requested feature - custom flow and task run names!
New keyword arguments, flow_run_name for flows and task_run_name for tasks, have been added. They both accept a string that will be used to create a run name for each run of the function. For example:
In order to make these names dynamic, you can template them using the parameter names of the task or flow function, using all of the basic rules of Python string formatting as follows:
Thank you for this feature!
I’m building a generic ETL pipeline for several projects, therefore it is very useful to be able to pass the project name as parameter and see it in the flow run overview.
I’m wondering, though, if the pipeline is scheduled to run, say, once per day, could I somehow include the date into the flow run name? I tried passing date=pd.Timestamp.now and then using flow_run_name=f"{project}_{date():%Y%m%d}", but alas, JSON does not support serializing function objects…