How to Consolidate DateTime Columns
Use Case
I have two SQL connectors. One syncs DateTime columns as TIMESTAMP_NTZ, whereas the other syncs DateTime columns as TIMESTAMP_TZ. How do I change the data type of the DateTime columns to be consistent across both the connectors?
Environment
Connector: SQL Server
Answer
You can consolidate the DateTime columns in two ways:
Change timestamps to TIMESTAMP_TZ
In your source database, alter the column's data type from TIMESTAMP_NTZ to TIMESTAMP_TZ. We sync the DateTime columns as TIMESTAMP_TZ.
Change timestamps to TIMESTAMP_NTZ
Drop the table from your destination schema. We sync the DateTime columns as TIMESTAMP_NTZ.
NOTE: This option may increase the Monthly Active Rows (MAR) of the table.
Cause
We changed our data type conversion strategy on March 2020:
- Connectors created before March 25, 2020 sync DateTime columns as TIMESTAMP_TZ.
- Connectors created on or after March 25, 2020 sync DateTime columns as TIMESTAMP_NTZ.
NOTE: If you are using a connector (created before March 25, 2020) and recently added a new table to sync, then the existing tables will have TIMESTAMP_TZ columns, and the new table will have TIMESTAMP_NTZ columns. Contact our support team if you want the data type to be consistent across all tables.