Skip to content

Instantly share code, notes, and snippets.

@dgadiraju
Last active May 20, 2017 15:43
Show Gist options
  • Select an option

  • Save dgadiraju/622015e103b96384749628bb615523d9 to your computer and use it in GitHub Desktop.

Select an option

Save dgadiraju/622015e103b96384749628bb615523d9 to your computer and use it in GitHub Desktop.
val path = "/public/retail_db" or val path = "/Users/itversity/Research/data/retail_db"
val rdd = sc.textFile(path + "/orders")
rdd.first
rdd.take(10)
rdd.collect
rdd.take(10).foreach(println)
rdd.take(10).foreach(k => println(k.split(",")(0) + "\t" + k.split(",")(1)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment