Skip to main content

VERA Testframework

Maakt het makkelijk om te testen of data voldoet aan de VERA-standaard m.b.v. het pyspark-testframework.

Tutorial

Op het moment is het vera-testframework alleen compatibel met pyspark.

from vera_testframework.pyspark import ReferentiedataTest
from pyspark.sql import SparkSession
from testframework.dataquality import DataFrameTester
spark = SparkSession.builder.appName("vera_testframework").getOrCreate()

Hieronder wordt een voorbeeld DataFrame gemaakt m.b.t. ruimten, waarvan we gaan testen of de waardes voldoen aan de VERA-standaard.

ruimten = [
    (1, "LOG", "Loggia"),
    (2, "WOO", "Woonkamer"),
    (3, "BAD", "Badruimte"),
    (4, "BAD", "Badkamer"),
    (5, None, "Kelder"),
    (6, "SLA", None),
]

ruimten_df = spark.createDataFrame(ruimten, ["id", "code", "naam"])

We maken gebruik van de DataFrameTester van het pyspark-testframework om onze testresultaten in bij te houden.

testframework = DataFrameTester(
    df=ruimten_df,
    primary_key="id",
    spark=spark,
)

Door middel van de ReferentiedataTest kunnen we testen of een kolom voldoet aan de VERA-standaard m.b.t. Referentiedata.

testframework.test(
    col="code",
    test=ReferentiedataTest(
        soort="RUIMTEDETAILSOORT",
        attribuut="Code",
        release="latest",  # standaard is latest, maar kan ook een specifieke versie zijn zoals v4.1.240419
    ),
    nullable=False,  # of een waarde leeg mag zijn. Dit is aan de gebruiker
).show(truncate=False)
+-----------+----------------------------------------+-----------+----------+----------------------------------+--------+
|primary_key|test_name                               |test_result|test_value|test_description                  |test_col|
+-----------+----------------------------------------+-----------+----------+----------------------------------+--------+
|1          |code__VERA_LATEST_RUIMTEDETAILSOORT_Code|true       |LOG       |VERA_LATEST_RUIMTEDETAILSOORT_Code|code    |
|2          |code__VERA_LATEST_RUIMTEDETAILSOORT_Code|true       |WOO       |VERA_LATEST_RUIMTEDETAILSOORT_Code|code    |
|3          |code__VERA_LATEST_RUIMTEDETAILSOORT_Code|true       |BAD       |VERA_LATEST_RUIMTEDETAILSOORT_Code|code    |
|4          |code__VERA_LATEST_RUIMTEDETAILSOORT_Code|true       |BAD       |VERA_LATEST_RUIMTEDETAILSOORT_Code|code    |
|5          |code__VERA_LATEST_RUIMTEDETAILSOORT_Code|false      |NULL      |VERA_LATEST_RUIMTEDETAILSOORT_Code|code    |
|6          |code__VERA_LATEST_RUIMTEDETAILSOORT_Code|true       |SLA       |VERA_LATEST_RUIMTEDETAILSOORT_Code|code    |
+-----------+----------------------------------------+-----------+----------+----------------------------------+--------+
testframework.test(
    col="naam",
    test=ReferentiedataTest(
        soort="RUIMTEDETAILSOORT",
        attribuut="Naam",
    ),
    nullable=True,
    description="Naam van ruimtedetailsoort voldoet aan de VERA-standaard"
).show(truncate=False)
+-----------+----------------------------------------+-----------+----------+--------------------------------------------------------+--------+
|primary_key|test_name                               |test_result|test_value|test_description                                        |test_col|
+-----------+----------------------------------------+-----------+----------+--------------------------------------------------------+--------+
|1          |naam__VERA_LATEST_RUIMTEDETAILSOORT_Naam|true       |Loggia    |Naam van ruimtedetailsoort voldoet aan de VERA-standaard|naam    |
|2          |naam__VERA_LATEST_RUIMTEDETAILSOORT_Naam|true       |Woonkamer |Naam van ruimtedetailsoort voldoet aan de VERA-standaard|naam    |
|3          |naam__VERA_LATEST_RUIMTEDETAILSOORT_Naam|false      |Badruimte |Naam van ruimtedetailsoort voldoet aan de VERA-standaard|naam    |
|4          |naam__VERA_LATEST_RUIMTEDETAILSOORT_Naam|true       |Badkamer  |Naam van ruimtedetailsoort voldoet aan de VERA-standaard|naam    |
|5          |naam__VERA_LATEST_RUIMTEDETAILSOORT_Naam|true       |Kelder    |Naam van ruimtedetailsoort voldoet aan de VERA-standaard|naam    |
|6          |naam__VERA_LATEST_RUIMTEDETAILSOORT_Naam|true       |NULL      |Naam van ruimtedetailsoort voldoet aan de VERA-standaard|naam    |
+-----------+----------------------------------------+-----------+----------+--------------------------------------------------------+--------+

De resultaten van de testen zijn te vinden in de .results attribuut van de DataFrameTester.

testframework.results.show(truncate=False)
+-----------+----------------------------------------+-----------+----------+--------------------------------------------------------+--------+---------------+-----------------------+
|primary_key|test_name                               |test_result|test_value|test_description                                        |test_col|primary_key_col|timestamp              |
+-----------+----------------------------------------+-----------+----------+--------------------------------------------------------+--------+---------------+-----------------------+
|1          |code__VERA_LATEST_RUIMTEDETAILSOORT_Code|true       |LOG       |VERA_LATEST_RUIMTEDETAILSOORT_Code                      |code    |id             |2025-10-21 15:58:35.475|
|2          |code__VERA_LATEST_RUIMTEDETAILSOORT_Code|true       |WOO       |VERA_LATEST_RUIMTEDETAILSOORT_Code                      |code    |id             |2025-10-21 15:58:35.475|
|3          |code__VERA_LATEST_RUIMTEDETAILSOORT_Code|true       |BAD       |VERA_LATEST_RUIMTEDETAILSOORT_Code                      |code    |id             |2025-10-21 15:58:35.475|
|4          |code__VERA_LATEST_RUIMTEDETAILSOORT_Code|true       |BAD       |VERA_LATEST_RUIMTEDETAILSOORT_Code                      |code    |id             |2025-10-21 15:58:35.475|
|5          |code__VERA_LATEST_RUIMTEDETAILSOORT_Code|false      |NULL      |VERA_LATEST_RUIMTEDETAILSOORT_Code                      |code    |id             |2025-10-21 15:58:35.475|
|6          |code__VERA_LATEST_RUIMTEDETAILSOORT_Code|true       |SLA       |VERA_LATEST_RUIMTEDETAILSOORT_Code                      |code    |id             |2025-10-21 15:58:35.475|
|1          |naam__VERA_LATEST_RUIMTEDETAILSOORT_Naam|true       |Loggia    |Naam van ruimtedetailsoort voldoet aan de VERA-standaard|naam    |id             |2025-10-21 15:58:35.475|
|2          |naam__VERA_LATEST_RUIMTEDETAILSOORT_Naam|true       |Woonkamer |Naam van ruimtedetailsoort voldoet aan de VERA-standaard|naam    |id             |2025-10-21 15:58:35.475|
|3          |naam__VERA_LATEST_RUIMTEDETAILSOORT_Naam|false      |Badruimte |Naam van ruimtedetailsoort voldoet aan de VERA-standaard|naam    |id             |2025-10-21 15:58:35.475|
|4          |naam__VERA_LATEST_RUIMTEDETAILSOORT_Naam|true       |Badkamer  |Naam van ruimtedetailsoort voldoet aan de VERA-standaard|naam    |id             |2025-10-21 15:58:35.475|
|5          |naam__VERA_LATEST_RUIMTEDETAILSOORT_Naam|true       |Kelder    |Naam van ruimtedetailsoort voldoet aan de VERA-standaard|naam    |id             |2025-10-21 15:58:35.475|
|6          |naam__VERA_LATEST_RUIMTEDETAILSOORT_Naam|true       |NULL      |Naam van ruimtedetailsoort voldoet aan de VERA-standaard|naam    |id             |2025-10-21 15:58:35.475|
+-----------+----------------------------------------+-----------+----------+--------------------------------------------------------+--------+---------------+-----------------------+

Voor meer informatie over hoe het pyspark-testframework te gebruiken, raadpleeg de documentatie op hun Github

spark.stop()

Metadata

Release files for vera-testframework 1.0.1

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

Source distribution (sdist)

Source distribution for vera-testframework 1.0.1
File Size Uploaded Provenance
vera_testframework-1.0.1.tar.gz 16.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for vera-testframework 1.0.1
File Interpreter ABI Platform
vera_testframework-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.6 kB

Release files / vera_testframework-1.0.1.tar.gz

Download URL vera_testframework-1.0.1.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8c99d78940dc51333dba6ca3ea19303898e9903e50e78acdaa971b189b7ebcf9
BLAKE2b-256 checksum
How to use checksums
cc47da129249b48f8868ce772cc727c107a9e1627e7cf1b93c61fbd749cd3314
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 10, 2026.

Transparency log

Release files / vera_testframework-1.0.1-py3-none-any.whl

Download URL vera_testframework-1.0.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79b2835ff4a9b7ae559a2d0e258fdba24927e4e68c684915f9f6344de27a2469
BLAKE2b-256 checksum
How to use checksums
873aa1fa91edcf325107619940a17e64384b83a4688bfa9639be1e254058918e
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 10, 2026.

Transparency log

Security for vera-testframework 1.0.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for vera_testframework-1.0.1.tar.gz

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 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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