When I am trying to load the parquet data into my table, I am getting error as “Query 1 ERROR at Line 17: : Invalid DATE/TIME in type conversion for column ‘event_time’”
Following is my query:
LOAD DATA S3 's3://bucket-name/files/'
CONFIG '{"region" : "{region}"}'
CREDENTIALS '{"aws_access_key_id" : "{aws_access_key_id}", "aws_secret_access_key": "{aws_secret_access_key}"}'
INTO TABLE example_table
(id <- id,
event_time <- event_time,
category <- category,
data <- data)
FORMAT PARQUET;
When I checked the format of the event_time using the duckdb, it looks correct like following:
“2024-12-02 13:24:52”
Query 2 ERROR at Line 7: : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘INTERVAL @ts MICROSECOND)’ at line 1
LOAD DATA S3 's3://bucket-name/files/'
CONFIG '{"region" : "{region}"}'
CREDENTIALS '{"aws_access_key_id" : "{aws_access_key_id}", "aws_secret_access_key": "{aws_secret_access_key}"}'
INTO TABLE example_table
(id <- id,
@ts <- event_time,
category <- category,
data <- data)
FORMAT PARQUET
SET event_time = TIMESTAMPADDDATE_ADD(MICROSECOND, @ts/1000'1970-01-01', from_unixtime(0));
INTERVAL @ts MICROSECOND);
This was the query.
Following is the format of data in parquet :
2024-12-05T12:34:56.123Z
2024-12-05T15:45:12.987Z
etc
Schema says optional int64 event_time (TIMESTAMP(MILLIS,true)); in parquet file