Drop Partition
This section applies only to MRS 3.50-LTS or later.
Function
This command is used to delete a single partition or multiple partitions.
Syntax
alter table $tableName drop partition (Partitioning field= 'Match condition')
Example
// Delete a partition. alter table $tableName drop partition (dt='2021-10-01') // Delete partitions. alter table $tableName drop partition (dt='2021-10-01', dt='2021-10-02') // Fuzzy match to delete multiple partitions. alter table $tableName drop partition (dt='2021-10-*') // Delete the partition of October.
Precautions
You can use fuzzy match to delete multiple partitions. Only asterisks (*) are supported. Complex regular expressions are not supported.
Response
You can view command execution results in the driver log or on the client.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot