MySQL Date/Time Fields Sync as TIMESTAMP_TZ in Snowflake Instead of TIMESTAMP_NTZ
Issue
TIMESTAMP fields appear in Snowflake destinations as TIMESTAMP_TZ(9) instead of TIMESTAMP_NTZ(9).
Environment
- All MySQL Connectors
- Destination: Snowflake
Resolution
To resolve this issue, change the source column’s data type from TIMESTAMP to DATETIME. Because DATETIME has no time zone component, Fivetran syncs it to Snowflake as TIMESTAMP_NTZ(9).
Alternatively, if you can’t change the source schema, convert the data type in Snowflake using a post-load transformation:
SELECT timestamp_tz_column::TIMESTAMP_NTZ(9) AS timestamp_ntz_column
FROM your_table;
You can apply this conversion using dbt or custom SQL transformations.
Cause
This issue occurs because the MySQL TIMESTAMP data type is time zone aware. MySQL converts TIMESTAMP values to UTC when storing them and converts them back to the session time zone on retrieval.
Fivetran preserves this behavior by syncing MySQL TIMESTAMP columns to Snowflake as TIMESTAMP_TZ(9).