pvignesh92
Honored Contributor

Hi @andrew li​, When you specify a path with LOCATION keyword, Spark will consider that to be an EXTERNAL table. So when you dropped the table, you underlying data if any will not be cleared.

So in you case, as this is an external table, you folder structure should already be partitioned Ex. ../<table_dir>/month=jan. Now when you create a table mentioning the partition column as month, Spark can scan the storage and detect the partitions.

Please check from your end if this is missed. If still does not work, providing the screenshots can help to understand the issue

View solution in original post