spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Panayotov <spanayo...@msn.com>
Subject RE: How to output RDD to one file with specific name?
Date Thu, 25 Aug 2016 17:55:26 GMT
You can do something like:

 

dbutils.fs.cp("/foo/part-00000","/foo/my-data.csv")

 

Stefan Panayotov, PhD

 <mailto:spanayotov@outlook.com> spanayotov@outlook.com

 <mailto:spanayotov@comcast.net> spanayotov@comcast.net

Cell: 610-517-5586

Home: 610-355-0919

 

From: Gavin Yue [mailto:yue.yuanyuan@gmail.com] 
Sent: Thursday, August 25, 2016 1:15 PM
To: user <user@spark.apache.org>
Subject: How to output RDD to one file with specific name?

 

I am trying to output RDD to disk by

 

rdd.coleasce(1).saveAsTextFile("/foo")

 

It outputs to foo folder with a file with name: Part-00000. 

 

Is there a way I could directly save the file as /foo/somename ?

 

Thanks. 

 


Mime
View raw message