SQL testing tool for Google BigQuery
Project description
BQSpec
===================================
| SQL testing tool for Google BigQuery.
| this library is pre-alpha. not recommended to production use.
| (under construction now)
Getting Started
--------
.. code:: bash
pip install git+https://github.com/orisano/bqspec
.. code:: bash
gcloud auth application-default login
How to Use
--------
spec.yaml
.. code:: 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
# 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
License
--------
MIT
===================================
| SQL testing tool for Google BigQuery.
| this library is pre-alpha. not recommended to production use.
| (under construction now)
Getting Started
--------
.. code:: bash
pip install git+https://github.com/orisano/bqspec
.. code:: bash
gcloud auth application-default login
How to Use
--------
spec.yaml
.. code:: 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
# 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
License
--------
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bqspec-0.0.1.tar.gz
(7.4 kB
view hashes)
Built Distribution
bqspec-0.0.1-py2.py3-none-any.whl
(11.1 kB
view hashes)
Close
Hashes for bqspec-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba64a9e445470a27cd2a877f28cb411290622c7d58c5b427f60ad88ff6188af9 |
|
MD5 | 47c982631a4465a8f9a6d2ccb1af8457 |
|
BLAKE2b-256 | 0f4491ae0d975496272d45580c6d6ecdefe116b83adc0562047bb3bccf98de23 |