Skip to main content

A PySpark package to check missing dates in tables

Project description

Date Validator PySpark

A PySpark utility for validating date completeness in tables.

Installation

pip install pyspark-date-validator

Example Usage

Validating Multiple Tables with MultipleTablesValidator

Run checks across multiple tables and raise an error if any have missing dates.

from date_validator import MultipleTablesValidator

# Define table configurations
table_configs = [
    {"table_name": "table1", "start_date": "2023-01-01", "end_date": "2023-01-05", "frequency": "daily"},
    {"table_name": "table2", "start_date": "2023-01-01", "end_date": "2023-03-31", "frequency": "monthly"}
]

# Run validation
validator = MultipleTablesValidator(table_configs)
validator.run_checks()
# Output:
# Missing dates in table 'table1' (daily):
# +----------+
# |  as_at_dt|
# +----------+
# |2023-01-02|
# |2023-01-04|
# |2023-01-05|
# +----------+
# Missing dates in table 'table2' (monthly):
# +----------+
# |  as_at_dt|
# +----------+
# |2023-02-28|
# +----------+
# ValueError: Missing dates detected in one or more tables.

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

pyspark_date_validator-0.1.6.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

pyspark_date_validator-0.1.6-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyspark_date_validator-0.1.6.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for pyspark_date_validator-0.1.6.tar.gz
Algorithm Hash digest
SHA256 5f070d91f327fe4299e3b0e9955fea1d2d45bfa7524e8c7090d669202f63410b
MD5 495cfbd6ded3dfbaef76f0c7c230384f
BLAKE2b-256 f10c7bca43c5196e0db3b0da53f102a2dde6e080fce16ee24b934b4caf4215c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyspark_date_validator-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 cfe59930e41aa42e589c82637e49a925d2a4ea9c45c0ea3685b6cecfe18e987b
MD5 997cc066191d0fcb13480d8878158443
BLAKE2b-256 ee6f8436984d484e6d551f39687a801b65e1dab55e5a88dc0e581848ba5c4a5a

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