cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

writing spark dataframe as CSV to a repo

chari
Contributor

Hi,

I wrote a spark dataframe as csv to a repo (synced with github). But when I checked the folder, the file wasn't there. 

Here is my code:

spark_df.write.format('csv').option('header','true').mode('overwrite').save('/Repos/abcd/mno/data')
 
No error message ! Nevertheless no file inside the folder 'data'. In addition 'abcd' is my repo name, inside it is a folder 'mno' which contains 'data'.
-Thx
2 REPLIES 2

Hi @Retired_mod ,

Thanks for the help. But my problem is that I do not see any files in the target folder. I am looking for options.

-Regards

feiyun0112
Honored Contributor

 the folder 'Repos' is not your repo, it's `dbfs:/Repos`, please check

dbutils.fs.ls('/Repos/abcd/mno/data')

 

Connect with Databricks Users in Your Area

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