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

Alexey Zavalskiy

06/20/2023, 11:15 AM
Hi! I want to clean up old data from event log DB (use postgresql). Found instruction at https://github.com/dagster-io/dagster/discussions/12047, but i'd like to delete only part of events for each run, not whole run. What way to interact with DB you recommend? SQLAlchemy and manual connection to database, or maybe there is some dagster interface for such interaction with events db?
j

johann

06/21/2023, 8:38 PM
you’ll need to use a manual connection, because dagster only offers the delete all events for run api
you could potentially use dagster apis (either graphql or python) to identify a set of event primary ids you want to remove… but depending on what filtering you’re doing it’s probably easy enough to do (and more performant) in the same manual query
4 Views