Last active
April 4, 2016 15:49
-
-
Save MrPowers/18b936494f457f990a2a1397395a1233 to your computer and use it in GitHub Desktop.
Writing a Spark DataFrame to a CSV file
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
tx_cities.coalesce(1).write | |
.format("com.databricks.spark.csv") | |
.option("header", "true") | |
.save(System.getProperty("user.home") + "/Desktop/texas_cities") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment