Skip to main content

prizm-adls-scanner

Python Version License Databricks Platform

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 spark session
  • ✅ Runtime deps are just requests and sqlglot — pyspark is intentionally not a dependency (Databricks already provides Spark on the cluster; installing PyPI pyspark there would conflict with it)
  • ✅ pyspark is imported lazily inside each runner module, so pip install/import prizm_adls_scanner succeeds even outside Databricks (useful for local dev of non-Spark code paths)

What it is not:

  • ❌ Not a CLI — no console script, no argparse/click entry 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

Compiled Modules

databricks/comparison_driver.py, databricks/lookup_driver.py, and databricks/exception_runner.py — the comparison/reconciliation, lookup-matching, and exception-detection engines — ship as compiled Cython extensions (.so), not plain Python. Everything else (databricks/__init__.py, _runtime.py, exception_metadata_runner.py, materialize_runner.py, side_snapshot_runner.py, the thin *_runner.py wrappers) stays plain Python.

Consequences:

  • The published wheels are manylinux only, one per Python version (cp39–cp313) — built via cibuildwheel, see [tool.cibuildwheel] in pyproject.toml. They will not install on non-Linux platforms or Python versions outside that range. There is no sdist (an sdist is source-by-definition, which would defeat the point).
  • Building it yourself (make build, or an editable pip install -e .) requires a C compiler and Cython — both pulled in automatically as build-time dependencies, but you need a working cc/gcc on your machine. An editable install does not exercise the compiled build — it just points back at the source directory, so the protected modules stay fully readable in-place during local development. Protection only applies to what actually gets published.

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 runner
  • LOOKUP → lookup runner
  • COMPARISON → comparison runner
  • BEHAVIORAL → side-snapshot runner
  • MATERIALIZE_ICEBERG / DELETE (or is_delete_action, or no job_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
    catalog/                        # ADLS_TECHNICAL_CATALOG 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

Release files for prizm-adls-scanner 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for prizm-adls-scanner 0.1.9
File
prizm_adls_scanner-0.1.9-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
prizm_adls_scanner-0.1.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details
prizm_adls_scanner-0.1.9-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
prizm_adls_scanner-0.1.9-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
prizm_adls_scanner-0.1.9-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details

Total release size: 16.0 MB

Release files / prizm_adls_scanner-0.1.9-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL prizm_adls_scanner-0.1.9-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.2 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1929cb25590efa8c90f6e269868225a178a4345205e7fb2adc3eb32cd0dae0e1
BLAKE2b-256 checksum
How to use checksums
811bcb1c2627780f7c6446355508b6639f8b98ec87ea8cd833e46919e2f8af67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / prizm_adls_scanner-0.1.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL prizm_adls_scanner-0.1.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.2 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
cbb80fbfbdd158e4878123def912b31763d9ddd082d6b7cc1aad45165936a71d
BLAKE2b-256 checksum
How to use checksums
4117978d780504675f72c3a89b60de5ef6f6d116454b005d39caa54e501a1050
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / prizm_adls_scanner-0.1.9-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL prizm_adls_scanner-0.1.9-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.3 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2db1848fcb16b870fdd64b60aba8f5b27318c193e4c0d8572fef1963af576cfc
BLAKE2b-256 checksum
How to use checksums
cbcff27fc903b8457b61feb622f252f2e4da79882a3a51cad6188e4c110593ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / prizm_adls_scanner-0.1.9-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL prizm_adls_scanner-0.1.9-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.2 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1f12a58fa0bdd1761f3652c904a84f2263e367e5c8f5069e7e893e6b8cf315a4
BLAKE2b-256 checksum
How to use checksums
522a5ce7349571a35e6157d6a796c7cdc5ddc338d43a8fb1319c6f6b736ac04b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / prizm_adls_scanner-0.1.9-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL prizm_adls_scanner-0.1.9-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.1 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3a3f1ae8ca8bc7bec3c284264a4274038b7a3be24078c6a9164dc8c2e3073cc5
BLAKE2b-256 checksum
How to use checksums
587e7e26efc2567c71c1051dbf2ddea6056521b7a0b2742067e58635e46c1ff5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.7

5 release files

0.2.6

5 release files

0.2.5

5 release files

0.2.4

5 release files

0.2.3

5 release files

0.2.2

5 release files

0.2.1

5 release files

0.1.15

5 release files

0.1.14

5 release files

0.1.13

5 release files

0.1.12

5 release files

0.1.11

5 release files

0.1.10

5 release files

This release

0.1.9 This release

5 release files

0.1.8

5 release files

0.1.7

5 release files

0.1.6

5 release files

0.1.5

5 release files

0.1.4

5 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page