Skip to main content

This package is used to perform a BigQuery dry run of all `.sql` files in a folder and its subfolders.

Project description

Overview

This application is used to perform a BigQuery dry run of all .sql files in a folder and its subfolders.

Its purpose it so ensure that all SQL files do not have any syntactic errors and make it easier for team members to quickly check a large number of files.

GCP configuration

Allowing access to GCP should be done following one of the methods detailed in the GCP documentation.

The application will rely on your environment having been set up for authentication to GCP (e.g. through gcloud init or environement variable containing service account credentials), it does not provide a mechanism to receive authentication credentials directly.

Usage

The application will install a shell command called bqdry which is simply passed a folder. It will then traverse the folder and perform a dry run of all .sql files found in the folder and any sub folders. The results will be displayed on in the terminal.

For example:

$ bqdry my-awesome-project

>File: my-awesome-project/demo.sql
>  Result: Failed
>  Errors: None
>
>Total: 3
>Succeeded: 2
>Failed: 1

bqdry -h will provide usage information. E.g.

usage: bqdry [-h] [-t THREADS] [-v] folder

Dry run of all `.sql` files in folder and subfolders.

positional arguments:
  folder                Top level folder to start scanning for `.sql` files.

optional arguments:
  -h, --help            show this help message and exit
  -t THREADS, --threads THREADS
                        Number of threads for concurrent running of queries. Defaults to 2.
  -v, --verbose         Show all file results, not just failures.

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

bigquery-dry-run-0.3.1.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

bigquery_dry_run-0.3.1-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page