Instead of blindly truncating a table it would be better to create a temp table first which has the same structure as the target table. Then import into the temp table and if everything worked fine drop the target table and rename the temp to target.
Instead of blindly truncating a table it would be better to create a temp table first which has the same structure as the target table. Then import into the temp table and if everything worked fine drop the target table and rename the temp to target.