Spark SQL Data Types

Some data type similarity between Snowflake and Snowpark

Conversion Table

Spark SQLSnowflakeNotes

BIGINT

BIGINT

BOOLEAN

BOOLEAN

BYTE

BYTEINT

CHAR

CHAR

DATE

DATE

DECIMAL

DECIMAL

DOUBLE

DOUBLE

FLOAT

FLOAT

INTEGER

INTEGER

LONG

INT

Check out note

SHORT

INT

Check out note

STRING

STRING

TIMESTAMP

TIMESTAMP_TZ

TIMESTAMPNTZ

TIMESTAMP_NTZ

VARCHAR

VARCHAR

Notes

See the documentation on Spark SQL data types

Integer types

For the conversion of integer data types (LONG and SHORT) each one is converted to INTEGER in Snowflake, because INTEGER contains the range numbers for both of them.

  • SparkSQL LONG: -32768 to 32767

  • SparkSQL SHORT: -9223372036854775808 to 9223372036854775807

  • Snowflake INTEGER:-99999999999999999999999999999999999999 to +99999999999999999999999999999999999999

Last updated