JDBC Driver for Snowflake

Build 23.0.8839

Data Type Mapping

Data Type Mappings

The driver maps types from the data source to the corresponding data type available in the schema. The table below documents these mappings.

NOTE: In Snowflake, the type fetched can differ from the type used to create a field. Set SessionParameters to JDBC_TREAT_DECIMAL_AS_INT=false to map INT types to DECIMAL and avoid this behavior.

Data Source Data Type
NUM DECIMAL
DEC DECIMAL
NUMERIC DECIMAL
INT DECIMAL
INTEGER DECIMAL
BIGINT DECIMAL
SMALLINT DECIMAL
TINYINT DECIMAL
BYTEINT DECIMAL
DOUBLE FLOAT
FLOAT FLOAT
FLOAT4 FLOAT
FLOAT8 FLOAT
DOUBLEPRECISION FLOAT
REAL FLOAT
VARCHAR VARCHAR
CHAR VARCHAR
STRING VARCHAR
TEXT VARCHAR
BINARY BINARY
VARBINARY BINARY
BOOLEAN BIT
DATE DATE
DATETIME TIMESTAMP
TIME TIME
TIMESTAMP TIMESTAMP
TIMESTAMP_LTZ TIMESTAMP
TIMESTAMP_NTZ TIMESTAMP
TIMESTAMP_TZ TIMESTAMP
VARIANT VARCHAR
OBJECT VARCHAR
ARRAY VARCHAR
GEOGRAPHY VARCHAR

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839