Rap70r edited a comment on issue #4876:
URL: https://github.com/apache/hudi/issues/4876#issuecomment-1050277266
Hi @nsivabalan,
I built a job that runs below code periodically to refresh a table:
```
val df = sc.read.load("s3://some_bucket/some_folder/*.parquet")
df.write.format("hudi").
option("hoodie.datasource.write.operation","insert_overwrite_table").
option("hoodie.datasource.write.precombine.field", "ts_ms").
option("hoodie.datasource.write.recordkey.field", "some_key").
option("hoodie.table.name", "test_table").
mode(Overwrite).
save("s3://some_bucket/output_folder/output/")
```
I noticed on each run, it keeps adding more parquet files to the output
folder. Not sure why that's happening. The data wasn't changing in the source
dataframe before writing.
Am I doing something wrong here?
First run produced 265 files. Second run increased the files to 303. Third
run the files increased to 346.
Can you please explain why new files are being generated? Also, is it
possible to decrease the number of files being generated?
The goal is to refresh existing partitioned parquet files atomically.
Thank you
--
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]