Truncate Apigee postgres for a certain date range

anvimalia
Participant III

Hi

We are trying to clean up postgres and were wondering if there's a recommended method to clean up/truncate the fact tables (preferably without a file dump) by giving a certain date

We know this command is suggested.. but looks like its restricted to the latest data.. is there a way to modify this to date range we specify?

Thanks

/opt/apigee/apigee-service/bin/apigee-service apigee-postgresql pg-data-purge <Org><Env><NoOfDaysToPurgeBackFromCurrentDate>
0 1 393
1 REPLY 1

Hi @Anvi, the pg-data-purge script drops all child fact tables which are older than the NoOfDaysToPurgeBackFromCurrentDate value that you pass. Do you want to keep some older data for any reason? Also since the script only truncates child fact tables, aggregate data which is used by most dashboards will not get truncated.