DQLabs Prizm - Data Quality Metrics Collection for Databricks and Cloud Storage
Project description
DQLabs Prizm - Data Quality Metrics Library
A comprehensive Python library for collecting operational, profile, and structural metrics from cloud storage (ADLS/S3) using Databricks Spark.
📋 Table of Contents
- Features
- Installation
- Quick Start
- Configuration
- Usage Examples
- Metrics Collected
- API Reference
- Error Handling
- Development
- License
✨ Features
- ✅ Operational Metrics: Row count, column count, schema, file size, freshness
- ✅ Profile Metrics: Completeness, Uniqueness, Character, Space per column
- ✅ Structural Metrics: Per-column technical statistics
- ✅ Duplicate Detection: Full-row or partition-based duplicate counting
- ✅ Multiple Storage: ADLS Gen2 and S3 support
- ✅ Databricks Native: Optimized for Databricks Spark (Serverless compatible)
- ✅ API Integration: Sends metrics to DQLabs webhook endpoint
- ✅ Webhook Support: Custom webhook URL for results
- ✅ Job Type Support: OPERATIONAL, PROFILE, STRUCTURAL, FULL, COMPUTE_METRIC
📦 Installation
Option 1: Install from PyPI (Recommended)
pip install dqlabs-prizm
Option 2: Install from Source
git clone https://github.com/dqlabs/prizm-python.git
cd prizm-python
pip install -e .
Option 3: Build locally
./build_package.sh
pip install dist/dqlabs_prizm-1.0.0-py3-none-any.whl
Databricks Notebook Installation
%pip install dqlabs-prizm
dbutils.library.restartPython()
Basic Usage
from dqlabs_prizm import PrizmScanner, PrizmConfig
from dqlabs_prizm.config.settings import JobType
# Create configuration
config = PrizmConfig(
access_token="your_access_token",
mcp_host="https://your-mcp-host.com",
api_version="v1",
asset_id="your_asset_id",
source_id="your_source_id",
qualified_name="your_file.csv",
run_id="run_001",
job_type=JobType.FULL,
connector="adls",
storage_account="your_storage_account",
container="your_container",
file_path="path/to/file.csv",
access_key="your_access_key",
extra_headers={"ngrok-skip-browser-warning": "true"} # For ngrok tunnels
)
# Initialize scanner with Spark session
scanner = PrizmScanner(config, spark=spark, validate_token=True)
# Run the scan
result = scanner.scan()
# Access results
print(f"Row Count: {result['row_count']:,}")
print(f"Column Count: {result['column_count']}")
print(f"Duplicate Count: {result['duplicate_count']}")
🤝 Support
For support, please contact DQLabs support or open an issue on GitHub.
📝 Changelog
Version 1.0.0
- Initial release
- Support for ADLS and S3
- Operational, Profile, Structural metrics
- Databricks Spark integration
- COMPUTE_METRIC job type
- Duplicate detection
- Webhook support
- Extra headers support
- Serverless compatible
Built with ❤️ by DQLabs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dqlabs_prizm-1.0.0.tar.gz
(25.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dqlabs_prizm-1.0.0.tar.gz.
File metadata
- Download URL: dqlabs_prizm-1.0.0.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12d08f70e2883c138574906a99b2ab39dff6a13f24d983e543a665a335364e51
|
|
| MD5 |
afc862e1e93678443ee4c15e44b98add
|
|
| BLAKE2b-256 |
ed5d9207c019b08927135023bbc8668474827e0ffacced19e762ad00e64eee52
|
File details
Details for the file dqlabs_prizm-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dqlabs_prizm-1.0.0-py3-none-any.whl
- Upload date:
- Size: 29.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
758a0924bb3e6f9f27be35bb2bf6d027c793e075dce07bfb6fb9e0396ffd667a
|
|
| MD5 |
567ae87e39ee10d92e5f530348b3ef9c
|
|
| BLAKE2b-256 |
2cdaad8ad7a1ecfb78e5fe674a6ea4b6496119aa68cbfdec63d1cade71380167
|