diff --git a/src/languages/snowflake/snowflake.formatter.ts b/src/languages/snowflake/snowflake.formatter.ts index 2ec81b1a86..33e9939e1c 100644 --- a/src/languages/snowflake/snowflake.formatter.ts +++ b/src/languages/snowflake/snowflake.formatter.ts @@ -328,6 +328,8 @@ export const snowflake: DialectOptions = { '||', // Generators: https://docs.snowflake.com/en/sql-reference/functions/generator.html#generator '=>', + // Assignment https://docs.snowflake.com/en/sql-reference/snowflake-scripting/let + ':=', ], propertyAccessOperators: [':'], }, diff --git a/test/snowflake.test.ts b/test/snowflake.test.ts index f2d124f944..438a3c94f0 100644 --- a/test/snowflake.test.ts +++ b/test/snowflake.test.ts @@ -54,7 +54,7 @@ describe('SnowflakeFormatter', () => { supportsIdentifiers(format, [`""-qq`]); supportsBetween(format); // ':' and '::' are tested later, since they should always be dense - supportsOperators(format, ['%', '||', '=>'], { any: true }); + supportsOperators(format, ['%', '||', '=>', ':='], { any: true }); supportsJoin(format, { without: ['NATURAL INNER JOIN'] }); supportsSetOperations(format, ['UNION', 'UNION ALL', 'MINUS', 'EXCEPT', 'INTERSECT']); supportsLimiting(format, { limit: true, offset: true, fetchFirst: true, fetchNext: true });