xushiyan commented on issue #6001:
URL: https://github.com/apache/hudi/issues/6001#issuecomment-1296297443

   @JoshuaZhuCN let me clarify: when it comes to delete the whole table, we 
support 3 syntaxes
   
   - TRUNCATE TABLE: delete all records via file system; table retained in 
metastore
   - DROP TABLE: delete no record; table removed from metastore
   - DROP TABLE PURGE: delete all records via file system; table removed from 
metastore
   
   So in your case where you expect data deleted from the storage, you should 
use 
   
   ```sql
   DROP TABLE IF EXISTS `default`.`spark_hudi_test_ddl` PURGE;
   ```
   
   If you use `DROP TABLE` (without purge) and you want to recreate the table 
again, your CREATE TABLE statement should just be
   
   ```sql
   CREATE TABLE IF NOT EXISTS `default`.`spark_hudi_test_ddl` USING HUDI
   LOCATION 'hdfs://localhost:9000/hudi/test/spark_hudi_test_ddl';
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to