Skip to main content

The SQL Test module assists in testing of data between SQL database tables. This is the development version of the module.

Use examples include comparing data in a view to those in a table derived from a star schema, or comparing results from a table derived from an external source to a table built via ETL.

Main Features

  • Class: SQLTest

    1. Creates and runs SQL database queries based on attributes provided with class instantiation or custom SQL query string.
    2. Completes five built in tests based on field-type categorizations of count, low_distinct, high_distinct, numeric, id_check.
    3. Flags fields above a specified difference threshold for "priority review".
    4. Displays a summary of results.
    5. Saves results and summary as specified.
  • Function: compare_tables

    1. Auto-detects the type of test to be run.
    2. Utilizes methods of SQLUnitTest to complete a full comparison of table values.
  • Function: sql_query

    1. Conducts basic database queries

Functionality Overview

The concept behind the testing is that database information can often be segmented by a field, such as dates. Testing can be done by comparing field values across these groupings. For a more detailed description of the available functionality, check out the development page.

Basic Query

Run Test Battery

Setup Code

A summarized version of results (as a DataFrame or image), indicating the percentage difference between table fields (and the test type used), is available via the test battery.

Visual Summary

Setup

First Installation

The files sql_secrets.py and sql_config.py provide examples of how the SQLAlchemy engines can be configured. These files should be customized for personal use. You can find these files in your Python/environment directory under Lib/site-packages/sql_test/.

When updating these files, do not change the name or location of the files. Doing so will cause errors in the future if updating.

Dependencies

All dependencies are downloaded on installation if not already present. This module utilizes:

Acknowledgements

Testing is completed using the PostgreSQL DVD Rental sample database.

Metadata

Release files for sql-test 0.1.5

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

Source distribution (sdist)

Source distribution for sql-test 0.1.5
File Size Uploaded Provenance Actions
sql_test-0.1.5.tar.gz 16.1 kB Without provenance Details for sql_test-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sql-test 0.1.5
File Interpreter ABI Platform Actions
sql_test-0.1.5-py3-none-any.whl Python 3 none any Details for sql_test-0.1.5-py3-none-any.whl

Total release size: 32.1 kB

Release files / sql_test-0.1.5.tar.gz

Download URL sql_test-0.1.5.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
22947950d5596b4cafa131169861c4d1b56f6ced10d5a5e8dfb920db3c93a4e6
BLAKE2b-256 checksum
How to use checksums
5f53482b7deef8a694157064039a17b9ede788f4c7b610ed8bde6e6e0952a674
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

Release files / sql_test-0.1.5-py3-none-any.whl

Download URL sql_test-0.1.5-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3440f1316e032e0e129975fa11e99fe2d4bd0e42767fcb173c91225b296c40c4
BLAKE2b-256 checksum
How to use checksums
0a3f0d74ae7f47c92f8d483f30270daa30dfdb56431b2c32aa76e4dee287e128
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

Security for sql-test 0.1.5

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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