Hey, is it possible to have CloudQuery delete tables from a Postgres sync if they have been deprecated in the list of supported AWS tables?
Hi @oriented-penguin, can you clarify what you mean by have been deprecated in the list of supported AWS tables
?
At the end of each sync, CloudQuery will delete stale data (assuming you’re using the default write_mode: overwrite-delete-stale
- more in CloudQuery Documentation).
The way CloudQuery does it is by deleting all records that match the source name in the spec and have a lower sync time than the latest sync.
Perfect, this is what I was looking for when a table is deprecated, but what about when a table was once syncing in template YAML but has since been removed? Do we need to delete that table from the database?
Do you mean removed from the spec? So yes, you’ll have to delete those manually as the CLI will only delete tables referenced from the spec configuration file.