Skip to content

Instantly share code, notes, and snippets.

@jccorrea
Created March 25, 2017 01:05
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 jccorrea/3313bc18bb1fe09e4b11ae5bc87d0b23 to your computer and use it in GitHub Desktop.
Save jccorrea/3313bc18bb1fe09e4b11ae5bc87d0b23 to your computer and use it in GitHub Desktop.
Spark - write single CSV file by Richard Garris
df.coalesce(1).write.format("com.databricks.spark.cvs").save("...path...")
#copy this file to local machine
dbutils.fs.cp("...path...", "..path.. ..csv")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment