Soda Core BigQuery is an extension for Soda Core, an open-source data quality testing tool. It enables users to define, execute, and monitor data quality checks directly against data stored in Google BigQuery. This package provides the necessary connector and SQL dialect definitions to interact with BigQuery, allowing for comprehensive data quality assessments within a Python environment, typically managed through the Soda CLI and YAML configuration files. The current version is 3.5.6, and it follows the release cadence of the broader Soda Core project.
pip install soda-core-bigqueryVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to run a Soda Scan programmatically against a BigQuery data source. It configures the BigQuery connection and defines simple data quality checks. For this to run successfully against your data, ensure BigQuery authentication is set up (e.g., `GOOGLE_APPLICATION_CREDENTIALS` environment variable or `gcloud auth application-default login`) and replace placeholder values for `project_id`, `dataset`, and `table` with your actual BigQuery resources.
Refer to the official Soda Core 3.x migration guide for CLI and YAML syntax updates. Always test configurations in a development environment before deploying to production.
Ensure the service account or user account has at least `BigQuery Data Viewer` (to read data) and `BigQuery Job User` (to run queries) roles. For service accounts, verify `GOOGLE_APPLICATION_CREDENTIALS` points to a valid key JSON file. For user credentials, ensure `gcloud auth application-default login` has been executed.
If encountering issues, explicitly check `pip show soda-core` and `pip show soda-core-bigquery` to confirm both are installed and compatible. Rarely, direct `pip install soda-core` might be needed if `soda-core-bigquery`'s dependency resolution fails.
Use a YAML linter or validator. Carefully review the Soda Core documentation for the exact YAML structure and examples. Pay close attention to spacing and nesting, especially for data source definitions and check configurations.