Skip to main content

SparkDQAgent — Data Quality validation package for K8s Spark pods

Project description

spark-data-quality

Data Quality validation library for Kubernetes Spark pods. Runs Great Expectations and persists results to a DQ Engine API.

Installation

pip install .            # core (GE + SQL)
pip install ".[spark]"   # includes PySpark
pip install -e ".[dev]"  # editable + dev tools

Usage

Single table

from spark_dq.quality import SparkDQAgent

agent = SparkDQAgent(
    catalog="my_catalog",
    schema="public",
    table="sales_data",
    data_quality_url="http://dq-engine:8000/api/v1/spark",
    catalog_type="unmanaged",
    table_id=13,
    test_suite_id=37,
    trino_host="sql-host:443",
    trino_user="user",
    trino_pwd="pwd",
)

cfg = agent.get_config()        # single GET /config call
results = agent.validate(df)    # hybrid SQL + GE execution

Suite run (auto-discover tables)

agent = SparkDQAgent(
    catalog="", schema="", table="",
    data_quality_url="http://dq-engine:8000/api/v1/spark",
    catalog_type="unmanaged",
    test_suite_id=37,
)
table_configs = agent.get_all_table_configs()  # returns list of per-table configs

Hybrid execution

When SQL engine credentials are provided, the agent splits expectations into two paths:

Path Assertion types How
SQL fast-path not_be_null, be_unique, be_between, match_regex, row_count_to_be_between Single batched SQL query
GE slow-path All others Parallel in-memory GE validators

Both paths run concurrently. Results are merged and saved via POST /save-results.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spark_data_quality-1.0.1.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spark_data_quality-1.0.1-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file spark_data_quality-1.0.1.tar.gz.

File metadata

  • Download URL: spark_data_quality-1.0.1.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spark_data_quality-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a536206daf2496ea0adad093bc8c8c2f5f62c08594026b9537e50970a7309e8c
MD5 2e1e41760875affab8a2d9508fd34bc4
BLAKE2b-256 27a8285f7b95584d6106a4438651fcf587b8178ebd068c8694f81aaec1b9ef8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for spark_data_quality-1.0.1.tar.gz:

Publisher: ci.yml on saal-core/digixt-quality-package

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spark_data_quality-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for spark_data_quality-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0080665192c99247b9496fe149279529a88df123dc5f9d99e93ff52842e33e8e
MD5 c78ff27f116bce2c3eb35d3d9847a90a
BLAKE2b-256 b6f4bd11023978795a2e7c0c7a0b1c828455895370537f07964217576d62bdb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for spark_data_quality-1.0.1-py3-none-any.whl:

Publisher: ci.yml on saal-core/digixt-quality-package

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page