September 2018
Intermediate to advanced
398 pages
9h 43m
English
Spark supports many different formats for persisting Datasets: CSV, Parquet, ORC, JSON, and many others, such as Avro, with the appropriate library.
With a row format, such as CSV, JSON, or Avro, the data is saved row by row. With a columnar format, such as Parquet or ORC, the data in the file is stored by columns.
For instance, we might have the following dataset of transactions:
+-------------------+--------+-------+-----+-------+|timestamp |tid |price |sell |amount |+-------------------+--------+-------+-----+-------+|2018-08-02 07:22:34| 0|7657.58|true |0.1 ||2018-08-02 07:22:47| 1|7663.85|false|0.2 ||2018-08-02 07:23:09| 2|7663.85|false|0.3 |+-------------------+--------+-------+-----+-------+
If we write ...
Read now
Unlock full access