Skip to main content

DataBase Quality Tool

Project description

DBQT (DataBase Quality Tool) 🎯

DBQT is a lightweight, Python-first data quality testing framework that helps data teams maintain high-quality data through automated checks and intelligent suggestions.

🛠️ Current Tools

Column Comparison Tool (dbqt compare)

Compare schemas between databases or files:

  • Table-level comparison
  • Column-level comparison with data type compatibility checks
  • Support for CSV and Parquet files
  • Handles nested Parquet schemas (arrays, structs, maps)
  • Intelligent data type compatibility checking
  • Generates detailed Excel report with:
    • Table differences
    • Column differences
    • Data type mismatches
    • Formatted worksheets for easy analysis

Usage:

dbqt compare source_schema.csv target_schema.csv
# Or compare Parquet files directly:
dbqt compare source.parquet target.parquet

To generate CSV schema files from your database, run this query:

SELECT
    upper(table_schema) as SCH,
    upper(table_name) as NAME,
    upper(column_name) as COL_NAME,
    upper(data_type) as DATA_TYPE,
    ordinal_position as ORDINAL_POSITION
FROM information_schema.columns
where UPPER(table_schema) = UPPER('YOUR_SCHEMA')
order by table_name, ordinal_position;

Export the results to CSV format to use with the compare tool.

Parquet Combine Tool (dbqt combine)

Combine multiple Parquet files into a single file:

  • Validates schema compatibility
  • Preserves nested data structures
  • Handles large datasets efficiently

Usage:

dbqt combine [output.parquet]  # Combines all .parquet files in current directory

Database Statistics Tool (dbqt dbstats)

Collect and analyze database statistics:

  • Table row counts
  • Updates statistics in CSV format
  • Configurable through YAML

Usage:

dbqt dbstats config.yaml

Example config.yaml:

# Database connection configuration
connection:
  type: mysql  # mysql, snowflake, duckdb, csv, parquet, s3parquet
  host: localhost
  user: myuser
  password: mypassword
  database: mydb
  # Optional AWS configs for s3parquet
  # aws_profile: default
  # aws_region: us-west-2
  # bucket: my-bucket

  # Snowflake-specific configs
  # type: snowflake
  # account: your_account.region
  # warehouse: YOUR_WAREHOUSE
  # database: YOUR_DB
  # schema: YOUR_SCHEMA
  # role: YOUR_ROLE
  # authenticator: externalbrowser  # Optional: use SSO authentication
  # user: your_username
  # password: your_password  # Not needed if using externalbrowser auth

# Path to CSV file containing table names to analyze
tables_file: tables.csv

The tables.csv file should contain at minimum a table_name column. The tool will add/update a row_count column with the results.

🚀 Future Plans

Core DBQT Features (Coming Soon)

  • AI-Powered column classification using Qwen2 0.5B
  • Automatic check suggestions
  • 20+ built-in data quality checks
  • Python-first API
  • No backend required
  • Customizable check framework

Planned Checks

  • Completeness checks (null values)
  • Uniqueness validation
  • Format validation (regex, dates, emails)
  • Range/boundary checks
  • Value validation
  • Statistical analysis
  • Dependency checks

Integration Plans

  • Data pipeline integration
  • Scheduled runs
  • Parallel check execution
  • Multiple database backend support

📄 License

This project is licensed under the MIT License.

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

dbqt-0.1.6.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

dbqt-0.1.6-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file dbqt-0.1.6.tar.gz.

File metadata

  • Download URL: dbqt-0.1.6.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.3

File hashes

Hashes for dbqt-0.1.6.tar.gz
Algorithm Hash digest
SHA256 468690a57a483727f8dda21ef4d147db606efd56d1161e15b81805fbd1b2bbbf
MD5 b2ca12e9bf278928caf43c1a44e02564
BLAKE2b-256 f0f1af7659c5dca10f2595a0eb3250ad738127db2d7f2c20f4c2110f36eacf2c

See more details on using hashes here.

File details

Details for the file dbqt-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: dbqt-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for dbqt-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 379ec5c5d190753ffb8a3ed81043b22b75fe01210814ab5a75876a1525e3fb57
MD5 a2bc1607e21d1cd079cbb4329c91b30c
BLAKE2b-256 adcdfff4e60bf2c5afebc21bae46115362c259dd5940c2aa8c9340b8c9b55d68

See more details on using hashes here.

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