delta-lake-utils
Production-grade utilities for Delta Lake table management and optimization on Databricks.
What Does This Package Do?
Automates Delta Lake table optimization, health monitoring, and pipeline generation for Databricks data engineers.
Main Features:
-
Smart OPTIMIZE - Automatically consolidates small files and improves query performance
- Detects when your Delta table has too many small files
- Intelligently chooses which columns to Z-ORDER by
- Reduces query time by up to 10x
-
Health Checker - Diagnoses table problems before they impact production
- Identifies small file problems
- Detects data skew across partitions
- Finds configuration issues
-
Performance Profiler - Measures how fast your Delta operations run
- Track read/write speeds
- Identify bottlenecks
- Compare before/after optimization
-
Medallion Generator - Auto-creates Bronze/Silver/Gold pipeline code
- Generates production-ready notebooks
- Follows best practices
- Saves hours of boilerplate coding
-
Unity Catalog Auditor - Manages permissions and access control
- Audits table permissions
- Generates permission scripts
- Ensures security compliance
Installation
pip install delta-lake-utils
Quick Start
from pyspark.sql import SparkSession
from delta_utils import DeltaOptimizer
spark = SparkSession.builder.getOrCreate()
optimizer = DeltaOptimizer(spark)
# Optimize a table - reduces files, improves performance
result = optimizer.auto_optimize('/mnt/delta/my_table')
print(f"Optimized! Removed {result.files_removed} files")
Use Cases
Use Case 1: Your queries are slow
Problem: Delta table has 5000 small files, queries take 10 minutes
Solution: Run optimizer, consolidates to 50 files, queries now take 1 minute
Use Case 2: Starting a new data pipeline
Problem: Need to build Bronze/Silver/Gold architecture from scratch
Solution: Use medallion generator, get complete pipeline in 30 seconds
Use Case 3: Data quality issues
Problem: Not sure if table is healthy, production keeps failing
Solution: Run health checker, get specific recommendations to fix issues
Use Case 4: Permission audit required
Problem: Need to verify all tables have correct access controls
Solution: Use catalog auditor to check and fix permissions
Documentation
- See QUICKSTART.md for 5-minute tutorial
- See EXPLANATION.md for detailed use cases
- See examples/EXAMPLES.md for code examples
Requirements
- Python 3.8+
- PySpark 3.2+
- Delta Lake 2.0+
- Databricks Runtime 11.0+ recommended
Author
Nalini Panwar GitHub: @panwarnalini-hub
License
MIT License - see LICENSE file for details
Metadata
Release files for delta-lake-utils 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| delta_lake_utils-1.0.0.tar.gz | 9.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| delta_lake_utils-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.5 kB
Release files / delta_lake_utils-1.0.0.tar.gz
| Download URL | delta_lake_utils-1.0.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be946bf4b966fc4cd3eec2cd9b1c7b0fcdc448b2b3ea0e58a151c1a0690e8c08
|
|
BLAKE2b-256 checksum How to use checksums |
f11d428b4fcf6ef283669d212b99994649377498ce2605baecf7d47e1d133816
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.5
|
Release files / delta_lake_utils-1.0.0-py3-none-any.whl
| Download URL | delta_lake_utils-1.0.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f78744dbf77ad52838e27c9c79ca6592b8e78b373b4a880de18a3f99acdeb3e5
|
|
BLAKE2b-256 checksum How to use checksums |
99f29a73cf2aeb8d9cb1650c1daeca2589070eec998c8a1290431f3ddc978afb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.5
|