How to append data to an existing parquet file

后端 未结 2 1841
长发绾君心
长发绾君心 2021-01-04 08:53

I\'m using the following code to create ParquetWriter and to write records to it.

ParquetWriter parquetWriter = new ParquetWriter(path,          


        
2条回答
  •  忘掉有多难
    2021-01-04 09:14

    There is a Spark API SaveMode called append: https://spark.apache.org/docs/1.4.0/api/java/org/apache/spark/sql/SaveMode.html which I believe solves your problem.

    Example of use:

    df.write.mode('append').parquet('parquet_data_file')
    

提交回复
热议问题