Arithmetic operators

Operators

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Translation for Arithmetic Operators

Conversion Table

Redshift
Snowflake
Comments

+/- (positive and negative sign/operator)

Fully supported by Snowflake

^ (exponentiation)

Fully supported by Snowflake

* (multiplication)

Fully supported by Snowflake

/ (division)

Redshift division between integers always returns integer value, FLOOR function is added to emulate this behavior.

% (modulo)

Fully supported by Snowflake

+ (addition)

+ and ||

Fully supported by Snowflake. When string are added, it is transformed to a concat.

- (subtraction)

Fully supported by Snowflake

@ (absolute value)

Fully supported by Snowflake

|/ (square root)

Fully supported by Snowflake

||/ (cube root)

Fully supported by Snowflake

Sample Source Patterns

Addition, Subtraction, Positive & Negative

Input Code:

Output Code:

Exponentiation, multiplication, division & modulo

Input Code:

Output Code:

Absolute value, Square root and Cube root

Input Code:

Output Code:

Known Issues

  1. In Snowflake, it is possible to use the unary operators +and - with string values, however in Redshift it is not valid.

No related EWIs.

Last updated