Translate SQL queries between database dialects (Snowflake, BigQuery, PostgreSQL, MySQL, etc.)
Agent: builder or migrator (may write translated SQL to files) Tools used: sql_translate, read, write, altimate_core_validate
Translate SQL queries from one database dialect to another using sqlglot's transpilation engine.
Determine source and target dialects — If the user did not specify both dialects, ask which source and target dialects to use. Common dialects: snowflake, bigquery, postgres, mysql, tsql, hive, spark, databricks, redshift, duckdb.
Get the SQL to translate — Either:
read)Call with:
sql_translatesql: The SQL query textsource_dialect: The source dialecttarget_dialect: The target dialectReview the result:
success is true, present the translated SQLwarnings, explain each one and what may need manual adjustmentsuccess is false, explain the error and suggest fixesFormat the output showing:
Offer next steps if applicable:
altimate_core_validate on the translated SQL to verify syntaxThe user invokes this skill with optional dialect and SQL arguments:
/sql-translate — Interactive: ask for source dialect, target dialect, and SQL/sql-translate snowflake postgres — Translate from Snowflake to PostgreSQL (will ask for SQL)/sql-translate snowflake postgres SELECT DATEADD(day, 7, CURRENT_TIMESTAMP()) — Full inline translation| Dialect | Key |
|---|---|
| Snowflake | snowflake |
| BigQuery | bigquery |
| PostgreSQL | postgres |
| MySQL | mysql |
| SQL Server | tsql |
| Hive | hive |
| Spark SQL | spark |
| Databricks | databricks |
| Redshift | redshift |
| DuckDB | duckdb |
| SQLite | sqlite |
| Oracle | oracle |
| Trino/Presto | trino / presto |
Use the tools: sql_translate, read, write, altimate_core_validate.