Arithmetic operators

Operators

circle-info

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 Documentationarrow-up-right

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

Thank you for your understanding.

Translation for Arithmetic Operators

Conversion Table

Redshift
Snowflake
Comments

+/-arrow-up-right (positive and negative sign/operator)

Fully supported by Snowflake

^arrow-up-right (exponentiation)

Fully supported by Snowflake

*arrow-up-right (multiplication)

Fully supported by Snowflake

/arrow-up-right (division)

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

Fully supported by Snowflake

+arrow-up-right (addition)

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

-arrow-up-right (subtraction)

Fully supported by Snowflake

@arrow-up-right (absolute value)

Fully supported by Snowflake

|/arrow-up-right (square root)

Fully supported by Snowflake

||/arrow-up-right (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