Last active
March 14, 2017 17:21
-
-
Save adrianulbona/ade2e20f4dc960a72d9c56f931fe8a30 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
case class Way(id: Long, nodes: Array[Long], tags: Map[String, String]) | |
val w1 = Way(1, Array(100, 200, 13, 20), Map("type"-> "highway")) | |
val w2 = Way(2, Array(30, 13, 500), Map("type"-> "ulita")) | |
val wayRDD = sc.parallelize(Array(w1, w2)) | |
val wayDF = wayRDD.toDF | |
wayDF.write.parquet("path/to/mighty_map") | |
val persistedWayDF = sqlContext.read.parquet("path/to/mighty_map") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment