Appendix Q. Reference for exporting data

You can use this appendix as a reference for all-things-export: main formats, options for Parquet, CSV, JSON, and more. Because you will need to export data in Spark, this appendix will be very useful. It has some similarities with appendix L (for ingestion). The content is aggregated from several web pages, providing an easy one-stop shop for all developers.

The general syntax for exporting data is illustrated in figure Q.1.

Figure Q.1 General syntax for exporting data from a dataframe, with format, option, and mode

Q.1 Specifying the way to save data

Spark supports numerous saving modes ( SaveMode

Get Spark in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.