Skip to content

Instantly share code, notes, and snippets.

@dgadiraju
Created November 23, 2017 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgadiraju/df9a09fa7fb334c50b218b7d0b160eb4 to your computer and use it in GitHub Desktop.
Save dgadiraju/df9a09fa7fb334c50b218b7d0b160eb4 to your computer and use it in GitHub Desktop.
// Reading different file formats
// JSON files are under this location on the lab
// You can download from github as well and copy to HDFS
hadoop fs -ls /public/retail_db_json/orders
sqlContext.read.json("/public/retail_db_json/orders").show
sqlContext.load("/public/retail_db_json/orders", "json").show
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment