Created
March 25, 2017 01:05
-
-
Save jccorrea/3313bc18bb1fe09e4b11ae5bc87d0b23 to your computer and use it in GitHub Desktop.
Spark - write single CSV file by Richard Garris
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
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