Daniel Gafni
07/11/2022, 1:55 PMLatestOnlyOperator
in Dagster?
for example, I have a job that inferences an ML model and pushes some values to Redis.
I only want to push the result to Redis for the latest partition (or, in Airflow terms, for the latest execution_date), so the production won't be affected by backfills, only the partitioned assets along the job.
What would be a solution in Dagster?Stephen Bailey
07/11/2022, 2:11 PMif context.get_tag("backfill"):
<http://context.log.info|context.log.info>("Is backfill run. Skipping...")
else:
... do not-backfill things
if you could write some code to get the latest partition for the job, you could also do a comparison of context.get_tag("partition") = latest_partition
, but I'm not sure how you would do that exactly.Daniel Gafni
07/11/2022, 2:12 PMlatest_partition
...
@sandy here is another reason to expose the exact partitions set (both global and mapped) to the execution contextsandy
07/12/2022, 11:31 PMDaniel Gafni
07/13/2022, 4:35 AM