<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/adding-and-deleting-partitions-in-delta-lake-tables-yycjjuwlb" -->

---
title: Adding and Deleting Partitions in Delta Lake tables
description: Explains how Delta Lake handles table partitions without needing Hive's ADD PARTITION and DROP PARTITION commands. Adding a partition is as simple as appending...
canonical: https://daily.dev/posts/adding-and-deleting-partitions-in-delta-lake-tables-yycjjuwlb
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Adding and Deleting Partitions in Delta Lake tables | daily.dev
og:description: Explains how Delta Lake handles table partitions without needing Hive's ADD PARTITION and DROP PARTITION commands. Adding a partition is as simple as appending...
og:url: https://daily.dev/posts/adding-and-deleting-partitions-in-delta-lake-tables-yycjjuwlb
og:image: https://api.daily.dev/og/posts/YYCjjuWlB.png
og:image:alt: Adding and Deleting Partitions in Delta Lake tables
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding and Deleting Partitions in Delta Lake tables

**[Delta Lake Blog](https://daily.dev/sources/delta-lake)** · 5 min read · 0 upvotes · 0 comments

## Summary

Explains how Delta Lake handles table partitions without needing Hive's ADD PARTITION and DROP PARTITION commands. Adding a partition is as simple as appending data with a new partition value, while removing one requires deleting the rows and running the vacuum command twice (once to remove data files, once to remove the now-empty directory). Delta Lake follows Hive-style disk layout for compatibility but relies on its transaction log rather than file listing to locate relevant files, avoiding the metadata/disk inconsistency issues that necessitate Hive's partition commands.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://delta.io/blog/2023-01-18-add-remove-partition-delta-lake>

## Questions this post answers

### Why doesn't Delta Lake have ADD PARTITION and DROP PARTITION commands like Hive?

Delta Lake stores partition metadata in its transaction log rather than relying on directory listing and a separate metastore, so data files and metadata stay consistent via ACID transactions and can never get out of sync. Hive needs those commands to manually resync the metastore with disk directories after external changes or crashes; Delta Lake eliminates that need entirely.

_See how daily.dev surfaces deeper explainers when comparing storage formats like Delta Lake and Hive._

### How do I remove a partition from a Delta Lake table?

Delete all rows belonging to that partition value (for example, DELETE FROM table WHERE country = 'Argentina'), then run the VACUUM command with a retention period. Vacuum must be run twice to fully remove the partition directory: the first run deletes the data files, leaving an empty directory, and the second run removes that empty directory.

_daily.dev helps engineers track practical Delta Lake maintenance steps like vacuum quirks before they hit production._

### Does Delta Lake use Hive-style directory partitioning like country=Colombia on disk?

Yes, Delta Lake follows the same Hive-style disk layout for compatibility with legacy systems, even though it does not actually rely on that layout for reading data. Instead, it reads the transaction log to find relevant files for a query, avoiding slow file listing operations that Hive depends on, especially for partitions with many files.

_daily.dev keeps data engineers current on how table formats like Delta Lake diverge from Hive conventions._

## Similar posts on daily.dev

- [Debunking 8 data layout myths: why Liquid Clustering outperforms partitioning](https://daily.dev/posts/debunking-8-data-layout-myths-why-liquid-clustering-outperforms-partitioning-lxazrlipq) · databricks · 12 upvotes · 2 comments

---

Tags: [#data-engineering](https://daily.dev/tags/data-engineering), [#apache-spark](https://daily.dev/tags/apache-spark), [#hive](https://daily.dev/tags/hive)

[View this post on daily.dev](https://daily.dev/posts/adding-and-deleting-partitions-in-delta-lake-tables-yycjjuwlb)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Adding and Deleting Partitions in Delta Lake tables","url":"https://daily.dev/posts/adding-and-deleting-partitions-in-delta-lake-tables-yycjjuwlb","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/adding-and-deleting-partitions-in-delta-lake-tables-yycjjuwlb"},"datePublished":"2026-08-16T08:53:51.435Z","dateModified":"2026-08-16T08:56:39.265Z","description":"Explains how Delta Lake handles table partitions without needing Hive's ADD PARTITION and DROP PARTITION commands. Adding a partition is as simple as appending...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1392bd2950d2fa81479cf3399b2b1398?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1392bd2950d2fa81479cf3399b2b1398?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Delta Lake Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Delta Lake Blog","logo":"https://media.daily.dev/image/upload/s--7f2q9Asf--/f_auto,q_auto/v1786870393/logos/delta-lake?_a=BAMAMicg0","url":"https://daily.dev/sources/delta-lake"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/adding-and-deleting-partitions-in-delta-lake-tables-yycjjuwlb","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"data-engineering,apache-spark,hive","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Delta Lake Blog","item":"https://daily.dev/sources/delta-lake"},{"@type":"ListItem","position":3,"name":"Adding and Deleting Partitions in Delta Lake tables"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/adding-and-deleting-partitions-in-delta-lake-tables-yycjjuwlb#faq","mainEntity":[{"@type":"Question","name":"Why doesn't Delta Lake have ADD PARTITION and DROP PARTITION commands like Hive?","acceptedAnswer":{"@type":"Answer","text":"Delta Lake stores partition metadata in its transaction log rather than relying on directory listing and a separate metastore, so data files and metadata stay consistent via ACID transactions and can never get out of sync. Hive needs those commands to manually resync the metastore with disk directories after external changes or crashes; Delta Lake eliminates that need entirely. See how daily.dev surfaces deeper explainers when comparing storage formats like Delta Lake and Hive."}},{"@type":"Question","name":"How do I remove a partition from a Delta Lake table?","acceptedAnswer":{"@type":"Answer","text":"Delete all rows belonging to that partition value (for example, DELETE FROM table WHERE country = 'Argentina'), then run the VACUUM command with a retention period. Vacuum must be run twice to fully remove the partition directory: the first run deletes the data files, leaving an empty directory, and the second run removes that empty directory. daily.dev helps engineers track practical Delta Lake maintenance steps like vacuum quirks before they hit production."}},{"@type":"Question","name":"Does Delta Lake use Hive-style directory partitioning like country=Colombia on disk?","acceptedAnswer":{"@type":"Answer","text":"Yes, Delta Lake follows the same Hive-style disk layout for compatibility with legacy systems, even though it does not actually rely on that layout for reading data. Instead, it reads the transaction log to find relevant files for a query, avoiding slow file listing operations that Hive depends on, especially for partitions with many files. daily.dev keeps data engineers current on how table formats like Delta Lake diverge from Hive conventions."}}]}
```

