Created
August 20, 2015 14:07
-
-
Save spektom/99f7330154be6c47e637 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val q = new org.apache.spark.sql.SQLContext(sc); | |
q.load("parquet", Map("path" -> "s3://raw-data/...", "mergeSchema" -> "false")) | |
.registerTempTable("organic") | |
q.sql("SELECT * FROM organic ...") | |
.map(_.mkString("\t")) | |
.coalesce(1, true) | |
.saveAsTextFile("s3://results-bucket/...") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment