jwills / target-duckdb

A Singer.io target for DuckDB
Other
17 stars 12 forks source link

Loading data with timestamps that have timezones result in error #28

Open felippecaso opened 1 year ago

felippecaso commented 1 year ago

When loading data that has a timestamp associated, the following error occurs:

duckdb.InvalidInputException: Invalid Input Error: timestamp field value "2019-01-10 05:21:23 -0300" has a timestamp that is not UTC
Use the TIMESTAMPTZ type with the ICU extension loaded to handle non-UTC timestamps. at line 1 in column "creationdate"

I believe this behavior is the one mentioned in the comment: https://github.com/jwills/target-duckdb/blob/ea8341defd9ea20a25c24f2f2ef9e2e638d7b9b8/target_duckdb/db_sync.py#L30-L32

Opening the issue to raise the discussion: