Skip to content

Instantly share code, notes, and snippets.

@girisandeep
Created June 21, 2017 20:38
Show Gist options
  • Save girisandeep/05d7e264d92762649c61f7b5dc66495f to your computer and use it in GitHub Desktop.
Save girisandeep/05d7e264d92762649c61f7b5dc66495f to your computer and use it in GitHub Desktop.
This is a naive csv parsing program. It can't handle the comma in values.
var lines = sc.textFile("/data/spark/temps.csv");
var recordsRDD = lines.map(line => line.split(","));
recordsRDD.take(10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment