Skip to content
BI Data

SQL Dialect Converter: BigQuery, Snowflake and Redshift

About this tool

Convert common SQL patterns between BigQuery, Snowflake and Redshift. The tool applies rule-based replacements for date, string and aggregate functions. Review and test the generated SQL in your target database.

Features:

  • Dialect conversion - BigQuery ↔ Snowflake ↔ Redshift
  • Date functions - DATE, TIMESTAMP, EXTRACT, DATE_TRUNC
  • String functions - CONCAT, SUBSTRING, SPLIT, REGEXP
  • Aggregate functions — COUNT, SUM and AVG with DISTINCT
  • Window functions - ROW_NUMBER, RANK, LAG/LEAD
  • Data types — replace supported dialect-specific types

Use cases:

Adapt SQL scripts for different cloud warehouses, explore dialect differences and prepare migration drafts. Generated queries require review against the target engine.

Source SQL

Converted SQL

SQL dialect differences

Operation BigQuery Snowflake Redshift
Current date CURRENT_DATE() CURRENT_DATE() CURRENT_DATE
Extract year EXTRACT(YEAR FROM date) YEAR(date) EXTRACT(YEAR FROM date)
Concatenate strings CONCAT(str1, str2) CONCAT(str1, str2) str1 || str2
Split a string SPLIT(string, delimiter) SPLIT(string, delimiter) SPLIT_PART(string, delimiter, 1)
Truncate date DATE_TRUNC(date, DAY) DATE_TRUNC('day', date) DATE_TRUNC('day', date)
Random number RAND() RANDOM() RANDOM()

More tools

Free tools for analysts and developers