Raghunadh Nittala
04/27/2023, 4:12 PMCREATE TABLE sink_table_s3 (
event_id STRING NOT NULL,
event_type STRING NOT NULL,
event_name STRING NOT NULL,
``date` STRING,`
results_count BIGINT
`) PARTITIONED BY (event_id, event_type, date) WITH (`
'connector' = 'filesystem',
'path' = '<path>',
'format' = 'parquet'
);
I’m using the below SQL query to sink data to S3 in parquet format:
INSERT INTO sink_table_s3
SELECT event_id, event_type, event_name, DATE_FORMAT(TUMBLE_END(proc_time, INTERVAL '1' HOUR), 'yyyy-MM-dd') AS record_date, COUNT(*) results_count
FROM source_table
GROUP BY event_id, event_type, event_name, TUMBLE(proc_time, INTERVAL '1' HOUR);
I am partitioning the table on event_id, event_type and date columns. I observed the parquet files are getting saved for an event_id, event_type, but the date is being wrong. The data being processed today is being saved to 2023-04-26 folder. As I am using proc_time to derive the date, I expect data to be saved to 2023-04-27 folder.
Can someone help me in identifying the issue?Martijn Visser
04/28/2023, 10:49 AMSwapnil Chougule
05/18/2023, 8:37 AMRaghunadh Nittala
05/18/2023, 8:52 AM