ppaglilla / bigquery-validation-example

Example project showcasing how to perform syntactic and semantic query validation for BigQuery using ZetaSQL and the ZetaSQL Toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BigQuery Query Validation Example

This is an example project showcasing how to perform syntactic and semantic query validation for BigQuery using ZetaSQL and the ZetaSQL Toolkit.

This project is an example-driven guide, where each example explains some aspect of the proposed solution using ZetaSQL. There are two sections:

  1. Syntactic validation
  2. Semantic validation

Navigating the examples

We recommend going through the examples in the provided order and reading them, together with the included javadocs and comments explaining them. They will walk you through both syntactic validation and semantic validation for queries.

Building containers for these examples

You can build containers for this examples easily using Jib. See Jib's quickstart.

Build the container locally

mvn compile jib:dockerBuild \
  -Dcontainer.mainClass=org.example.bigquery.validation.syntax.A_BasicParserExample

Build and push to a container registry

mvn compile jib:build \
  -Dcontainer.mainClass=org.example.bigquery.validation.syntax.A_BasicParserExample \
  -Dimage=gcr.io/...

About

Example project showcasing how to perform syntactic and semantic query validation for BigQuery using ZetaSQL and the ZetaSQL Toolkit

License:Apache License 2.0


Languages

Language:Java 100.0%