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.
  • Query parameters: named @name parameters. See Parametrized queries for passing parameter values from different client SDKs.
  • 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, MERGE, and TRUNCATE TABLE.
  • Information schema: the BigQuery-shaped information_schema views.
  • Firebolt’s own functions: call them with the firebolt. qualifier when GoogleSQL has no equivalent.

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.

Calling Firebolt functions

In BigQuery mode you get GoogleSQL’s functions, not Firebolt’s. A name that GoogleSQL does not define is rejected, even if Firebolt has a function by that name:
This way, if BigQuery later adds a function whose name Firebolt already uses, your existing queries keep doing what they did before. To call a Firebolt function, qualify it with firebolt:
This works for scalar, aggregate, window, and table functions. The rest of the call is unchanged, so DISTINCT, OVER, and an inline WHERE filter still apply:
A qualified call runs exactly as it would in Firebolt mode. BigQuery’s translation rules are skipped, so use Firebolt’s name for the function, not GoogleSQL’s. firebolt is a namespace, not a schema: it is the only qualifier a function call accepts, and you cannot use it to reach a table or a view.