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

What works

  • Query syntax: SELECT, FROM, joins including NATURAL and USING, LATERAL, set operations, QUALIFY, GROUP BY ALL, GROUPING SETS, ROLLUP, CUBE, CTEs, and SELECT * EXCLUDE.
  • Data types: NUMBER, FLOAT, BOOLEAN, VARCHAR, BINARY, DATE, TIMESTAMP_NTZ, TIMESTAMP_LTZ, TIMESTAMP_TZ, ARRAY, and GEOGRAPHY.
  • Operators: arithmetic, comparison, and logical operators, the :: cast, the : path operator, ILIKE, RLIKE, and LIKE ANY.
  • Functions:
    • Aggregate: ANY_VALUE, APPROX_COUNT_DISTINCT, APPROX_PERCENTILE, ARRAY_AGG, AVG, CORR, and more.
    • Bitwise: BITNOT, BITSHIFTLEFT, BITSHIFTRIGHT, BIT_NOT, GETBIT.
    • Conditional: COALESCE, GREATEST, IFF, IFNULL, LEAST, NOT, and more.
    • Context: CURRENT_DATABASE, CURRENT_SCHEMA, CURRENT_TRANSACTION, CURRENT_USER.
    • Conversion: none available.
    • Date and time: none available.
    • Geospatial: none available.
    • Hash: HASH, HASH_AGG, with limitations.
    • Numeric: ABS, ACOS, ASIN, ATAN2, ATAN, CBRT, and more.
    • Regular expressions: REGEXP_EXTRACT_ALL, REGEXP_LIKE.
    • Semi-structured: ARRAYS_OVERLAP, ARRAY_CAT, ARRAY_DISTINCT, ARRAY_MAX, ARRAY_MIN, ARRAY_REVERSE, and more.
    • String and binary: ASCII, CONCAT, LEFT, LENGTH, LIKE, LOWER, and more.
    • Window: CUME_DIST, DENSE_RANK, FIRST_VALUE, LAG, LAST_VALUE, LEAD, and more.
  • 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 snowflake:
Every statement in the session is then read as Snowflake SQL. You can also pass it as an HTTP query parameter (?dialect=snowflake) or in a WITH (dialect='snowflake') clause. Return to native Firebolt SQL with:
The default is firebolt. Only snowflake selects Snowflake mode.