<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unable to save CSV file into DBFS in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/unable-to-save-csv-file-into-dbfs/m-p/31770#M23147</link>
    <description>&lt;P&gt;hi @Lathesh B L​&amp;nbsp; I used the below code to save data in dbfs and it worked please check this also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is my code snippet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1502i96B0B428C90F7D35/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this is my file at DBFS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1504i4693BC8C8C9E1906/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let us know if it is working , we are happy to help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Aviral Bhardwaj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 04 Dec 2022 06:28:59 GMT</pubDate>
    <dc:creator>Aviral-Bhardwaj</dc:creator>
    <dc:date>2022-12-04T06:28:59Z</dc:date>
    <item>
      <title>Unable to save CSV file into DBFS</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-save-csv-file-into-dbfs/m-p/31769#M23146</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have took the azure datasets that are available for practice. I got the 10 days data from that dataset and now I want to save this data into DBFS in csv format. I have facing an error :&lt;/P&gt;&lt;P&gt;" No such file or directory: '/dbfs/tmp/myfolder/mytest.csv''"&lt;/P&gt;&lt;P&gt;but on the other hand if I am able to access the path directly from DBFS. This path is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code is : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;from azureml.opendatasets import NoaaIsdWeather
from datetime import datetime
from dateutil import parser 
from dateutil.relativedelta import relativedelta
&amp;nbsp;
spark.sql('DROP Table if exists mytest')
dbutils.fs.rm("/dbfs/tmp/myfolder",recurse = True)
&amp;nbsp;
basepath = "/dbfs/tmp/myfolder" 
&amp;nbsp;
try:
    dbutils.fs.ls(basepath)
except:
    dbutils.fs.mkdirs(basepath)
else:
   raise Exception("The Folder "+ basepath + " already exist, this notebook will remove in the end")
&amp;nbsp;
dbutils.fs.mkdirs("/dbfs/tmp/myfolder")
&amp;nbsp;
start_date = parser.parse('2020-5-1')
end_date = parser.parse('2020-5-10')
&amp;nbsp;
isd = NoaaIsdWeather(start_date, end_date)
pdf = isd.to_spark_dataframe().toPandas().to_csv("/dbfs/tmp/myfolder/mytest.csv")
&amp;nbsp;
  
  
  
&amp;nbsp;
&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What should I do ? &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 08:08:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-save-csv-file-into-dbfs/m-p/31769#M23146</guid>
      <dc:creator>learnerbricks</dc:creator>
      <dc:date>2022-09-14T08:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to save CSV file into DBFS</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-save-csv-file-into-dbfs/m-p/31770#M23147</link>
      <description>&lt;P&gt;hi @Lathesh B L​&amp;nbsp; I used the below code to save data in dbfs and it worked please check this also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is my code snippet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1502i96B0B428C90F7D35/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this is my file at DBFS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1504i4693BC8C8C9E1906/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let us know if it is working , we are happy to help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Aviral Bhardwaj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2022 06:28:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-save-csv-file-into-dbfs/m-p/31770#M23147</guid>
      <dc:creator>Aviral-Bhardwaj</dc:creator>
      <dc:date>2022-12-04T06:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to save CSV file into DBFS</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-save-csv-file-into-dbfs/m-p/31771#M23148</link>
      <description>&lt;P&gt;You can use spark dataframe to read and write the CSV files-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Read-
df=spark.read.csv("Path")
&amp;nbsp;
Write-
&amp;nbsp;
df.write.csv("Path")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 13:46:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-save-csv-file-into-dbfs/m-p/31771#M23148</guid>
      <dc:creator>Ajay-Pandey</dc:creator>
      <dc:date>2022-12-08T13:46:39Z</dc:date>
    </item>
  </channel>
</rss>

