Skip to main content

BQSpec

SQL testing tool for Google BigQuery.
this library is pre-alpha. not recommended to production use.

Getting Started

pip install bqspec
gcloud auth application-default login

How to Use

spec.yaml

# test target SQL filepath
query_path: ./sample.sql
# any BigQuery query parameters (optional). more details: https://cloud.google.com/bigquery/docs/parameterized-queries
params:
    - type: DATE
      name: date
      value: 2017-11-30
# known columns (optional).
columns:
    - id
    - a
    - b
    - c
    - total
# conditions which all rows must met (optional).
invariants:
    - total >= 0  # write python expression
    - a + b == c
# any test cases
cases:
    - where:
      - id == 1
      expected:
      - total == 15
      - a == 2
      - b == 3
      - c == 5
bqspec -f spec.yaml

or

bqspec -d .

Author

@orisano (Nao YONASHIRO)

License

MIT

Metadata

Release files for bqspec 0.3.3

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

Source distribution (sdist)

Source distribution for bqspec 0.3.3
File Size Uploaded Provenance Actions
bqspec-0.3.3.tar.gz 8.5 kB Without provenance Details for bqspec-0.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bqspec 0.3.3
File Interpreter ABI Platform Actions
bqspec-0.3.3-py2.py3-none-any.whl Python 2, Python 3 none any Details for bqspec-0.3.3-py2.py3-none-any.whl

Total release size: 19.1 kB

Release files / bqspec-0.3.3.tar.gz

Download URL bqspec-0.3.3.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b238e1f43f98371d805405534ae46f844e4e2d6a7305ade7b6f636e5a46eca7d
BLAKE2b-256 checksum
How to use checksums
586529f1b75fd09821d68ea000fde17db215a0a639cbef6feb5075841fb1d502
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.0

Release files / bqspec-0.3.3-py2.py3-none-any.whl

Download URL bqspec-0.3.3-py2.py3-none-any.whl
Size 10.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ecf65ae4742aaaa097075af0cf2d5a50a4de206853004ab7429d1305cc886311
BLAKE2b-256 checksum
How to use checksums
4d627acbb0e017da3eb37b8b74a774119d22c9532ae613d5fb94f66c0a4ecbc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.0

Security for bqspec 0.3.3

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