DiagramDB / BigQuery SQL Validator

BigQuery SQL Validator

Check GoogleSQL (BigQuery standard SQL) syntax offline: backtick-quoted project.dataset.table paths, STRUCT/ARRAY, UNNEST and QUALIFY.

BigQuery errors this catches, and how to fix them

  • Unquoted project ids with dashes. my-project.sales.orders must be written `my-project.sales.orders`.
  • Legacy SQL brackets. [project:dataset.table] is legacy SQL. Standard SQL uses backticks.
  • QUALIFY without a window. QUALIFY filters on window functions. It needs a WHERE, GROUP BY or HAVING clause, or a window function in the query.

Need to move this query to another database? The SQL dialect converter rewrites it and lists every change. To make it readable first, use the SQL formatter.

Other dialects

MySQL Syntax Checker · PostgreSQL Syntax Checker · SQL Server Syntax Checker · SQLite Syntax Checker · MariaDB Syntax Checker · Snowflake SQL Validator · Redshift SQL Validator · All dialects

Questions

Is this BigQuery syntax checker free and private?

Yes. The BigQuery grammar is downloaded once and your SQL is parsed in the browser, so nothing is uploaded. Only the optional “Explain & fix with AI” button sends the failing statement to an AI model.

Does it check that my BigQuery tables and columns exist?

No. It checks syntax only, because it never connects to your database. Valid statements list the tables and columns they reference so you can compare them yourself; EXPLAIN on a development database checks the names for real.

Which BigQuery versions are covered?

The grammar comes from the open-source node-sql-parser project and targets current BigQuery syntax. Very new features or vendor extensions can be flagged as errors even when the server accepts them; confirm those with the official BigQuery documentation.

Why does BigQuery reject unquoted project ids with dashes?

my-project.sales.orders must be written `my-project.sales.orders`.

Why does BigQuery reject legacy SQL brackets?

[project:dataset.table] is legacy SQL. Standard SQL uses backticks.

Related tools