Skip to main content
Preview BigQuery compatibility mode lets you run BigQuery GoogleSQL against Firebolt without rewriting it. When the mode is on, Firebolt parses each statement with BigQuery grammar and translates it to native Firebolt SQL, so BigQuery query syntax, functions, and type names work as written. Use it to point existing BigQuery queries and tools at Firebolt, and to migrate a workload incrementally: run the BigQuery SQL you already have, then adopt native Firebolt SQL where you want to.

What works

  • Query syntax: SELECT, FROM, joins, UNNEST, set operations with CORRESPONDING, QUALIFY, GROUP BY ALL, GROUPING SETS, ROLLUP, CUBE, CTEs, and SELECT * EXCEPT.
  • Pipe syntax: the |> pipe operator, including WHERE, SELECT, EXTEND, AGGREGATE, ORDER BY, LIMIT, JOIN, and set operations.
  • Data types: INT64, FLOAT64, NUMERIC, BOOL, STRING, BYTES, DATE, DATETIME, TIMESTAMP, GEOGRAPHY, JSON, ARRAY, and STRUCT.
  • Operators: arithmetic, comparison, and logical operators, IS DISTINCT FROM, IN UNNEST, JSON ->, ARRAY [], and AT TIME ZONE.
  • Functions:
    • Date and time: the DATE_, DATETIME_, TIMESTAMP_, FORMAT_, PARSE_, and UNIX_ families, plus type constructors.
    • String: SPLIT, CONTAINS_SUBSTR, INSTR, REGEXP_CONTAINS, REGEXP_EXTRACT, BYTE_LENGTH, and more.
    • JSON: JSON_VALUE, JSON_QUERY, the _ARRAY variants, typed accessors, and the -> operator.
    • Array: GENERATE_ARRAY, GENERATE_DATE_ARRAY, array literals, and lambdas.
    • Aggregate and approximate: standard and statistical aggregates, STRING_AGG, COUNTIF, LOGICAL_AND, LOGICAL_OR, and the HLL_COUNT family.
    • Math: DIV, SAFE_DIVIDE, PARSE_NUMERIC, trigonometric helpers, and native math functions.
    • Geography: ST_GEOGPOINT, ST_GEOGFROMTEXT, ST_CONTAINS, ST_DISTANCE, ST_INTERSECTS, and more.
    • Conditional and conversion: IF, IFNULL, NULLIF, COALESCE, CASE, the single-argument type functions, and CAST.
  • Statements: CREATE TABLE, CREATE VIEW, CREATE SCHEMA, DROP, ALTER TABLE, INSERT, UPDATE, DELETE, and TRUNCATE TABLE.

Enable the mode

Set the dialect session setting to bigquery:
Every statement in the session is then read as BigQuery GoogleSQL. You can also pass it as an HTTP query parameter (?dialect=bigquery) or in a WITH (dialect='bigquery') clause. Return to native Firebolt SQL with:
The default is firebolt. Only bigquery selects BigQuery mode.