What works
- Query syntax:
SELECT,FROM, joins,UNNEST, set operations withCORRESPONDING,QUALIFY,GROUP BY ALL,GROUPING SETS,ROLLUP,CUBE, CTEs, andSELECT * EXCEPT. - Query parameters: named
@nameparameters. See Parametrized queries for passing parameter values from different client SDKs. - Pipe syntax: the
|>pipe operator, includingWHERE,SELECT,EXTEND,AGGREGATE,ORDER BY,LIMIT,JOIN, and set operations. - Data types:
INT64,FLOAT64,NUMERIC,BOOL,STRING,BYTES,DATE,DATETIME,TIMESTAMP,GEOGRAPHY,JSON,ARRAY, andSTRUCT. - Operators: arithmetic, comparison, and logical operators,
IS DISTINCT FROM,IN UNNEST, JSON->,ARRAY [], andAT TIME ZONE. - Functions:
- Date and time: the
DATE_,DATETIME_,TIMESTAMP_,FORMAT_,PARSE_, andUNIX_families, plus type constructors. - String:
SPLIT,CONTAINS_SUBSTR,INSTR,REGEXP_CONTAINS,REGEXP_EXTRACT,BYTE_LENGTH, and more. - JSON:
JSON_VALUE,JSON_QUERY, the_ARRAYvariants, 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 theHLL_COUNTfamily. - 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, andCAST.
- Date and time: the
- Statements:
CREATE TABLE,CREATE VIEW,CREATE SCHEMA,DROP,ALTER TABLE,INSERT,UPDATE,DELETE,MERGE, andTRUNCATE TABLE. - Information schema: see below for supported
information_schemaviews.
Information schema
A supported view follows BigQuery’sINFORMATION_SCHEMA: its column names, order, and data types.
Supported views:
information_schema.tables(BigQuery reference).information_schema.columns(BigQuery reference).information_schema.jobs/jobs_by_user/jobs_by_project(BigQuery reference). Region-qualified; see below.information_schema.views(BigQuery reference).information_schema.schemata(BigQuery reference).information_schema.routines(BigQuery reference).information_schema.object_privileges(BigQuery reference).information_schema.search_indexes(BigQuery reference).information_schema.vector_indexes(BigQuery reference).
INFORMATION_SCHEMA view not listed does not exist in BigQuery mode: querying it raises a “relation does not exist” error.
Addressing
A supported view is reachable by the BigQuery dataset-qualified forms as well as the bare form:INFORMATION_SCHEMA.TABLES: the current database, all datasets.<dataset>.INFORMATION_SCHEMA.TABLES: one dataset (table_schema = '<dataset>').<project>.<dataset>.INFORMATION_SCHEMA.TABLES:<project>selects the database,<dataset>the schema.
`region-us`.INFORMATION_SCHEMA.*) are rejected for dataset-scoped views. The JOBS family is region-scoped in BigQuery (`region-us`.INFORMATION_SCHEMA.JOBS); Firebolt has no regions, so the region qualifier is accepted and ignored, and the bare form works too.
Notes
- Type-valued columns carry Firebolt spellings, not BigQuery’s:
tables.ddlreturns Firebolt DDL,columns.data_typereturns Firebolt type names (BIGINT,TEXT),views.view_definitionreturns Firebolt DDL, andtables.table_typemay carry Firebolt-specific values (for exampleEXTERNAL) for objects with no BigQuery equivalent. pg_cataloghas no BigQuery equivalent and is not available in BigQuery mode; referencing it raises a “relation does not exist” error.
Enable the mode
Set thedialect session setting to bigquery:
?dialect=bigquery) or in a WITH (dialect='bigquery') clause. Return to native Firebolt SQL with:
firebolt. Only bigquery selects BigQuery mode.