Commit 342464f 1 parent 7b21c84 commit 342464f Copy full SHA for 342464f
File tree 2 files changed +14
-3
lines changed
2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -356,7 +356,10 @@ def write_logged_features(
356
356
# In Pyarrow v13.0, the parquet version was upgraded to v2.6 from v2.4.
357
357
# Set the coerce_timestamps to "us"(microseconds) for backward compatibility.
358
358
pyarrow .parquet .write_table (
359
- table = data , where = parquet_temp_file , coerce_timestamps = "us"
359
+ table = data ,
360
+ where = parquet_temp_file ,
361
+ coerce_timestamps = "us" ,
362
+ allow_truncated_timestamps = True ,
360
363
)
361
364
362
365
parquet_temp_file .seek (0 )
@@ -407,7 +410,10 @@ def offline_write_batch(
407
410
# In Pyarrow v13.0, the parquet version was upgraded to v2.6 from v2.4.
408
411
# Set the coerce_timestamps to "us"(microseconds) for backward compatibility.
409
412
pyarrow .parquet .write_table (
410
- table = table , where = parquet_temp_file , coerce_timestamps = "us"
413
+ table = table ,
414
+ where = parquet_temp_file ,
415
+ coerce_timestamps = "us" ,
416
+ allow_truncated_timestamps = True ,
411
417
)
412
418
413
419
parquet_temp_file .seek (0 )
Original file line number Diff line number Diff line change @@ -353,7 +353,12 @@ def upload_arrow_table_to_redshift(
353
353
with tempfile .TemporaryFile (suffix = ".parquet" ) as parquet_temp_file :
354
354
# In Pyarrow v13.0, the parquet version was upgraded to v2.6 from v2.4.
355
355
# Set the coerce_timestamps to "us"(microseconds) for backward compatibility.
356
- pq .write_table (table , parquet_temp_file , coerce_timestamps = "us" )
356
+ pq .write_table (
357
+ table ,
358
+ parquet_temp_file ,
359
+ coerce_timestamps = "us" ,
360
+ allow_truncated_timestamps = True ,
361
+ )
357
362
parquet_temp_file .seek (0 )
358
363
s3_resource .Object (bucket , key ).put (Body = parquet_temp_file )
359
364
You can’t perform that action at this time.
0 commit comments