Metadata-Version: 2.1
Name: bq-validator
Version: 0.2.1
Summary: The `bq-validator` command enables us to validate BigQuery queries.
Author-email: yu-iskw <yuu.ishikawa-bq-validator@gmail.com>
Requires-Python: >=3.6.1
Description-Content-Type: text/markdown
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Dist: click ==8.0.3
Requires-Dist: click-completion ==0.5.2
Requires-Dist: google-cloud-bigquery >=1.25.0,<3.0.0
Requires-Dist: flit ==3.7.1 ; extra == "dev"
Requires-Dist: build ==0.7.0 ; extra == "dev"
Requires-Dist: yapf >=0.29.0 ; extra == "dev"
Requires-Dist: pyyaml >=5.3 ; extra == "dev"
Requires-Dist: pdoc3 >=0.9.2 ; extra == "dev"
Requires-Dist: pytest >=6.2.4,<7.0.0 ; extra == "test"
Requires-Dist: pylint >=2.12.0 ; extra == "test"
Requires-Dist: mypy ==0.910 ; extra == "test"
Requires-Dist: flake8 >=3.8.3,<4.0.0 ; extra == "test"
Requires-Dist: black ==21.9b0 ; extra == "test"
Requires-Dist: isort >=5.0.6,<6.0.0 ; extra == "test"
Requires-Dist: yapf >=0.29.0 ; extra == "test"
Provides-Extra: dev
Provides-Extra: test

[![Test python](https://github.com/yu-iskw/bq-validator/actions/workflows/test.yml/badge.svg)](https://github.com/yu-iskw/bq-validator/actions/workflows/test.yml)
<a href="https://pypi.org/project/bq-validator" target="_blank">
    <img src="https://img.shields.io/pypi/v/bq-validator?color=%2334D058&label=pypi%20package" alt="Package version">
</a>
<a href="https://pypi.org/project/bq-validator" target="_blank">
    <img src="https://img.shields.io/pypi/pyversions/bq-validator.svg?color=%2334D058" alt="Supported Python versions">
</a>


# bq-validator
This is a yet another BigQuery query validator.

The `bq query --dry_run` command enables us to validate queries.
However, the `bq` command doesn't support OIDC and impersonate service account.
When we take advantage of OIDC and impersonate service account, the `bq-validator` command would be useful.

## Install
The package is available on [pypi](https://pypi.org/project/bq-validator/)
```bash
pip install -U bq-validator
```

## How to use

```bash
Usage: bq-validator [OPTIONS] PATH

  Validate BigQuery queries

  PATH is either of a SQL file path or a directory. When it is a directory,
  the command recursively validates all SQL files in the directory.

Options:
  --client_project TEXT           BigQuery client project ID
  --client_location TEXT          BigQuery client location
  --impersonate_service_account TEXT
                                  Impersonate service account email
  --version                       Show the version and exit.
  --help                          Show this message and exit.
```

