The tables can be truncated using the attached custom plugin.
This can be achieved by designing a simple process flow. You may take help from the attached screenshot.
Note: Don't forget to make changes mentioned in the attached Custom Plugin.
Note: After placing the plugin in the flow, double click on it and go to its properties panel and make generate and consume stream to false.