How to purge old tag history data

There are many database tables (by monthly partition) which contains the tag history data, the tables are named as sqlt_data_{driverId}_{year}_{month}. As time passed away, I want to purge the tables which are over 12 months ago. My question is: Can I just manually delete these old tables use DROP TABLE sqlt_data_{driverId}_{year}_{month} ? I noticed all monthly partition tables' name are contained in another table sqlth_partitions. Is it necessary to also update this table (delete the rows) at same time?

Use the data pruning function in the history tag settings.

Don't do this pruning manually, its a hazardous exercise.

1 Like

You have not enabled the pruning. If you don't enable it, it will not delete data.

1 Like

Thank you David!

2 Likes