Let us understand how Spark’s SQL Context support reading files from different file formats.
- SQL Context have 2 methods to read files of different file formats
- load – takes 2 arguments
- read have APIs for each of the file format supported
- Following are the file formats supported out of the box
- Other file formats such as Avro can be easily plugged in
Note: As this topic will be covered in detail later for now we will see demo only using JSON