Python Connector for Snowflake

Data types - Python Connector for Snowflake

Data types

The following table describes the supported Snowflake data types and their mapping to the Python data types. The type codes returned in the description cursor attribute can be used in the addtypecast() cursor method.

Snowflake data type Type code Python data type

NUMBER

3008

float

DECIMAL

3008

float

FLOAT

3009

float

FLOAT4

3009

float

FLOAT8

3009

float

DOUBLE

3009

float

DOUBLE PRECISION

3009

float

REAL

3009

float

INT

3012

int

INTEGER

3012

int

BIGINT

3013

int

SMALLINT

3011

int

TINYINT

3011

int

BYTEINT

3003

int

VARCHAR

3017

str

CHAR

3017

str

CHARACTER

3017

str

STRING

3017

str

TEXT

3017

str

VARIANT

3017

str

OBJECT

3017

str

ARRAY

3017

str

GEOGRAPHY

3017

str

GEOMETRY

3017

str

BINARY

3002

binary

VARBINARY

3002

binary

BOOLEAN

3004

bool

DATE

3006

datetime.date

DATETIME

3007

datetime.datetime

TIME

3018

datetime.time

TIMESTAMP

3007

datetime.datetime

TIMESTAMP_LTZ

3007

datetime.datetime

TIMESTAMP_NTZ

3007

datetime.datetime

TIMESTAMP_TZ

3007

datetime.datetime

© 2022-2024 Devart. All Rights Reserved. Request Support Python Connectors Forum Provide Feedback