01-13-2023 12:14 PM
Hi all.
I am trying to export R data frame variable as csv file.
I am using this formula:
df<- data.frame(VALIDADOR_FIM)
df.coalesce(1).write.format("com.databricks.spark.csv").option("header", "true").save("dbfs:/FileStore/df/df.csv")
But isn´t working. How can this as export a csv file?
01-14-2023 01:18 AM
Please try to execute write.csv with the following path instead:
write.csv(TotalData,file='/dbfs/tmp/df.csv',row.names = FALSE)
%fs ls /tmp
01-14-2023 01:18 AM
Please try to execute write.csv with the following path instead:
write.csv(TotalData,file='/dbfs/tmp/df.csv',row.names = FALSE)
%fs ls /tmp
01-17-2023 04:26 AM
Hi @sherbin w tanks for Help! Now how i can acess this .csv to download?
I tryed:
%fs ls /tmp
and
read.df(path = "/tmp/VALIDADOR_FIM.csv")
but both didn´t worked.
01-17-2023 10:24 AM
@FELIPE VALENTE
you mean local download ?
01-17-2023 11:03 AM
Yes!
01-17-2023 07:56 PM
I don't think that will be possible in databricks. may be i wrong.
But what I did was mount s3 put that CSV file there and download it.
01-16-2023 03:23 AM
Hi @FELIPE VALENTE (Customer), We haven’t heard from you since the last response from @sherbin w (Customer) , and I was checking back to see if his suggestions helped you.
Or else, If you have any solution, please share it with the community, as it can be helpful to others.
Also, Please don't forget to click on the "Select As Best" button whenever the information provided helps resolve your question.
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.
If there isn’t a group near you, start one and help create a community that brings people together.
Request a New Group