Skip to content

Effortlessly validate and test your Google BigQuery queries with the power of pandas DataFrames in Python.

License

Notifications You must be signed in to change notification settings

ottogroup/bquest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BQuest

BQuest is a library for testing BigQuery queries in Python.

  • Use BQuest in combination with your favorite testing framework (e.g. pytest).
  • Create temporary test tables from JSON or Pandas DataFrame.
  • Run BQ configurations and plain SQL queries on your test tables and check the result.

Installation

BQuest also requires a dedicated BigQuery dataset for storing test tables, e.g.

resource "google_bigquery_dataset" "bquest" {
  dataset_id    = "bquest"
  friendly_name = "bquest"
  description   = "Source tables for bquest tests"
  location      = "EU"
  default_table_expiration_ms = 3600000
}

Example

We recommend to look at the BQuest integration tests.

Notes and Best Practices

  • It's good practice to define an expiration time for tables in BQuest datasets.