https://dagster.io/ logo
#ask-community
Title
# ask-community
d

David Sánchez

08/08/2022, 4:05 PM
Hi! Is there any way to set a data retention policy for runs? Not interested in storing old run history / logs. Documentation only mentions schedule / sensor data.
c

claire

08/08/2022, 9:03 PM
Hi David. Unfortunately there is no easy way to do this automatically. One thing that you could try is set up a job on a schedule that goes back and deletes old runs, using the instance methods (e.g.
context.instance.delete_run(run_id)
). By deleting runs, you might also delete some associated metadata (e.g. asset materializations), not sure if that matters to you or not
d

David Sánchez

08/09/2022, 7:17 AM
Hi Claire, I think this could work for us! Thanks!!!
🌈 1
103 Views