Handling deletes on ETL where the source is a LK dataset?

LabKey Support Forum (Inactive)
Handling deletes on ETL where the source is a LK dataset? Jon (LabKey DevOps)  2018-04-20 12:13
Status: Closed
 
Hi Ben,

You're right, https://www.labkey.org/Documentation/wiki-page.view?name=etlSchedule#deletedRowsSource would work in this case, but this typically is used on external sources and a database trigger would populate a deletedRowsSource (like an audit table) on the deletes.

You could use a query over the LabKey audit table like you're thinking, but it would be slow as you've seen. Indexing could possibly help speed things up here. But another alternative would be to create an afterDelete js trigger script on the dataset to populate a second (custom) table as the deletedRowsSource.

Regards,

Jon