Last active
September 1, 2019 01:16
-
-
Save eduardorost/c8b2ff3d2226f88a9a1e2fa977ac9d25 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
def sendS3(rdd: RDD[String]) = { | |
spark.read.json(rdd) | |
.coalesce(1) | |
.write | |
.mode("append") | |
.option("compression", "snappy") | |
.parquet("s3://bucket/folder") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment