Skip to content

Instantly share code, notes, and snippets.

@MrPowers
Last active April 4, 2016 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrPowers/18b936494f457f990a2a1397395a1233 to your computer and use it in GitHub Desktop.
Save MrPowers/18b936494f457f990a2a1397395a1233 to your computer and use it in GitHub Desktop.
Writing a Spark DataFrame to a CSV file
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