prizm-adls-scanner
Python package that runs Prizm Exception, Lookup, Comparison, Materialize, and Behavioral jobs inside a Databricks Spark cluster.
Location: prizm-cli/prizm-adls-scanner (under Server root)
What it is:
- ✅ A library imported inside a Databricks notebook or job task — it does not read files or connect to storage itself; it operates on an already-active
sparksession - ✅ Runtime deps are just
requestsandsqlglot—pysparkis intentionally not a dependency (Databricks already provides Spark on the cluster; installing PyPIpysparkthere would conflict with it) - ✅
pysparkis imported lazily inside each runner module, sopip install/import prizm_adls_scannersucceeds even outside Databricks (useful for local dev of non-Spark code paths)
What it is not:
- ❌ Not a CLI — no console script, no
argparse/clickentry point - ❌ Not a file scanner/connector — it has no ADLS/S3 I/O logic; it assumes data is already loaded into Spark by the notebook/job that calls it
- ❌ Not the metrics-collection scanner — that's a different, unrelated concern
Install
Databricks notebook
%pip install prizm-adls-scanner
dbutils.library.restartPython()
Cluster / job library (recommended for production)
Attach the published wheel as a cluster or job library so tasks don't need %pip on every run.
From a built wheel
make build
pip install dist/prizm_adls_scanner-*.whl
Note: pyspark is not a package dependency. Databricks already provides Spark. Do not install PyPI pyspark on the cluster.
Databricks notebook usage
Use a thin notebook; all job logic lives in the package:
%pip install prizm-adls-scanner
dbutils.library.restartPython()
import json
from prizm_adls_scanner.databricks import run_metric_notebook_job
WIDGET_NAMES = [
"job_config",
"storage_account",
"access_key",
"client_id",
"client_secret",
"tenant_id",
"uc_catalog",
"uc_schema",
"exception_url",
"run_id",
"file_batch",
"job_type",
"connector",
"container",
"asset_id",
"source_id",
]
for name in WIDGET_NAMES:
try:
dbutils.widgets.text(name, "")
except Exception:
pass
widgets = {}
for name in WIDGET_NAMES:
try:
widgets[name] = dbutils.widgets.get(name)
except Exception:
widgets[name] = ""
result = run_metric_notebook_job(
spark=spark,
dbutils=dbutils,
widgets=widgets,
)
dbutils.notebook.exit(json.dumps(result, default=str))
A reference notebook source also ships in the repo as prizm_adls_scanner/databricks/notebook/prizm_iceberg_notebook.py.
API
from prizm_adls_scanner.databricks import (
run_metric_notebook_job, # routes by widgets["job_type"] to the right runner
run_exception_job,
run_exception_notebook_job,
run_lookup_job,
run_comparison_job,
run_materialize_job,
)
# also available directly off the top-level package (lazy import):
from prizm_adls_scanner import run_exception_job
| Argument | Description |
|---|---|
spark |
Active Databricks SparkSession |
dbutils |
Optional dbutils |
widgets |
Dict of notebook/job widget values |
Every runner returns a dict with at least status (success / failed). On failure, includes error / errors.
run_metric_notebook_job routes by widgets["job_type"]:
EXCEPTION/EXCEPTION_METADATA→ exception runnerLOOKUP→ lookup runnerCOMPARISON→ comparison runnerBEHAVIORAL→ side-snapshot runnerMATERIALIZE_ICEBERG/DELETE(oris_delete_action, or nojob_type) → materialize runner (ADLS → Unity Catalog Delta UniForm)
Development
Development Setup
pip install -e ".[dev,test]"
Running Tests
Most of the test suite runs without pyspark installed (package-surface/import checks); a couple of tests are skipped automatically if pyspark isn't present.
make test
Building Wheels
make build
For offline/local environments where build dependencies are already installed:
make build-local
Clean Build Artifacts
make clean
Package Layout
prizm_adls_scanner/
__init__.py # lazy top-level re-exports
databricks/
__init__.py # run_exception_job, run_lookup_job, run_comparison_job,
# run_materialize_job, run_metric_notebook_job
_runtime.py # shared runtime helpers
exception_runner.py # EXCEPTION / EXCEPTION_METADATA runtime
exception_notebook.py # reference notebook source
exception_metadata_runner.py # exception metadata runtime
lookup_driver.py / lookup_runner.py # LOOKUP runtime
comparison_driver.py / comparison_runner.py # COMPARISON runtime
materialize_runner.py # MATERIALIZE_ICEBERG / DELETE runtime
side_snapshot_runner.py # BEHAVIORAL runtime
notebook/prizm_iceberg_notebook.py # reference Iceberg notebook source
License
MIT License
Support
For issues and questions, please visit: https://github.com/DQLabs-Inc/prizm-cli/issues
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 prizm_adls_scanner-0.1.2.tar.gz.
File metadata
- Download URL: prizm_adls_scanner-0.1.2.tar.gz
- Upload date:
- Size: 60.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74f4fcf72aea74c4a0f915cac5dc512b5240a4beb8bb70bb52a564899eb1b252
|
|
| MD5 |
4844b521f33a896d03d2e9852ff3b361
|
|
| BLAKE2b-256 |
aad3cacbcc6e7e5cc22f859482fb9aebae88c3e93732c76728978b4ca2cf6ad3
|
Provenance
The following attestation bundles were made for prizm_adls_scanner-0.1.2.tar.gz:
Publisher:
publish-pypi.yml on DQLabs-Inc/prizm-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prizm_adls_scanner-0.1.2.tar.gz -
Subject digest:
74f4fcf72aea74c4a0f915cac5dc512b5240a4beb8bb70bb52a564899eb1b252 - Sigstore transparency entry: 2617897595
- Sigstore integration time:
-
Permalink:
DQLabs-Inc/prizm-cli@8115b56d7553c54b25b7d25ef93d9b608b989ee8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/DQLabs-Inc
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@8115b56d7553c54b25b7d25ef93d9b608b989ee8 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file prizm_adls_scanner-0.1.2-py3-none-any.whl.
File metadata
- Download URL: prizm_adls_scanner-0.1.2-py3-none-any.whl
- Upload date:
- Size: 64.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41f57f82b8f14904b3703d60fe8bca6c0fed50dce7ce3a2f178eb64a70451433
|
|
| MD5 |
00ed8856faf3a778d2569d2c3952bd1e
|
|
| BLAKE2b-256 |
5545eeccf1de6f695c05a1da6fc0045692e7b727cf8a5506a949107f11a685d2
|
Provenance
The following attestation bundles were made for prizm_adls_scanner-0.1.2-py3-none-any.whl:
Publisher:
publish-pypi.yml on DQLabs-Inc/prizm-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prizm_adls_scanner-0.1.2-py3-none-any.whl -
Subject digest:
41f57f82b8f14904b3703d60fe8bca6c0fed50dce7ce3a2f178eb64a70451433 - Sigstore transparency entry: 2617897607
- Sigstore integration time:
-
Permalink:
DQLabs-Inc/prizm-cli@8115b56d7553c54b25b7d25ef93d9b608b989ee8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/DQLabs-Inc
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@8115b56d7553c54b25b7d25ef93d9b608b989ee8 -
Trigger Event:
workflow_dispatch
-
Statement type: