You can connect to Snowflake in the same way as to any other SQL database using a with the bundled Snowflake JDBC driver.
This section contains information about working with date-time data types that is common to , .
Working with dates and time zones can be challenging. As a quick rule before going into details, always specify the Format of date data fields in your metadata, see . Also setting the on the connection to match your local time zone may help.
There are five different and two time zones ( and ) that affect the results.
DATE
A date without a time component.
local
TIME
Wallclock time without a date.
local
TIMESTAMP_NTZ
Date and time without a time zone. Saved as the wallclock date-time in the session time zone. The time zone itself is not stored.
session
TIMESTAMP_TZ
Date and time with a time zone. The session time zone is stored as a part of the value and used for reading.
session
TIMESTAMP_LTZ
Written in the local time zone, but the time zone is not stored. The current time zone is always used for reading.
local
All of these Snowflake types map to just one data type in Data Shaper metadata: date.
An important property of the date data type is its Format. It provides a hint on how to interpret the data while reading or writing them to the database.
If the Format contains only a date part, it maps to the DATE type. If it contains only a time part, we consider it a TIME. And if it contains both, we treat it as a TIMESTAMP.
For example, "yyyy-MM-dd" or "dd/MM/yyyy" are DATE formats, "HH:mm:ss" is a TIME format, and "dd.MM.yyyy HH:mm:ss" is a TIMESTAMP.
See for more details.
Note that regardless of the Format, Data Shaper records store the full date and time value. The Format controls how that value is interpreted when reading and writing data.
Session Time Zone
This is the time zone of the connection, as configured in Snowflake. It is used for writing TIMESTAMPs.
Local Time Zone
See also
See the parameter in Snowflake documentation.
You can override the session time zone on the connection in , e.g., TIMEZONE=Asia/Singapore
.
This is the client time zone. It is used for reading and writing DATE and TIME columns. It is set to your system time zone by default. But you can override it in your metadata, even for individual fields. See and for details.