ad1happy2go commented on issue #9890:
URL: https://github.com/apache/hudi/issues/9890#issuecomment-1774444529

   @bradleybonitatibus I am not very sure about Redshift, But whenever we will 
try to read hudi table we should get in 'yyyy/mm/dd' format only. If somebody 
try to directly read the parquet file, then it may get it as long and value 
also as long. So may be something like that may be happening with Redshift hudi 
connector. The string value is actually correct as we are using 
TimestampBasedKeyGenerator. 
   Below is the code I used , please check - 
   
   ```
   DROP TABLE hudi_table;
   
   CREATE TABLE hudi_table (
       uuid STRING,
       rider STRING,
       driver STRING,
       fare DOUBLE,
       city STRING,
       ts BIGINT
   ) USING HUDI
   tblproperties (
   type = 'cow', primaryKey = 'uuid'
   
,hoodie.table.keygenerator.class='org.apache.hudi.keygen.TimestampBasedKeyGenerator'
   ,hoodie.deltastreamer.keygen.timebased.timestamp.type='UNIX_TIMESTAMP'
   ,hoodie.deltastreamer.keygen.timebased.output.dateformat='yyyy/MM/dd'
   )
   PARTITIONED BY (ts);
   
   INSERT INTO hudi_table
   VALUES
   
('334e26e9-8355-45cc-97c6-c31daf0df330','rider-A','driver-K',19.10,'san_francisco',1695159649);
   
   select * from hudi_table;
   ```
   
   <img width="1543" alt="image" 
src="https://github.com/apache/hudi/assets/63430370/4aefb929-a5ca-463e-a07e-9c5b9a2693e4";>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to