<?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: How to write *.csv file from DataBricks FileStore in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-write-csv-file-from-databricks-filestore/m-p/23971#M16631</link>
    <description>&lt;P&gt;@&lt;A href="https://community.databricks.com/s/profile/0053f000000WlPDAA0" alt="https://community.databricks.com/s/profile/0053f000000WlPDAA0" target="_blank"&gt;Jeff&lt;/A&gt;&amp;nbsp;(Customer), &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Mount your blob storage (or s3) to databricks and save it there. Then you can get it from a browser or using an app like storage explorer.&lt;/LI&gt;&lt;LI&gt;OR use display(your_dataframe) function - there is export option&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Fri, 01 Apr 2022 20:28:35 GMT</pubDate>
    <dc:creator>Hubert-Dudek</dc:creator>
    <dc:date>2022-04-01T20:28:35Z</dc:date>
    <item>
      <title>How to write *.csv file from DataBricks FileStore</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-write-csv-file-from-databricks-filestore/m-p/23968#M16628</link>
      <description>&lt;P&gt;Struggling with how to export a Spark dataframe as a *.csv file to a local computer. I'm successfully using the spark_write_csv funciton (sparklyr R library R) to write the csv file out to my databricks dbfs:FileStore location.  Becase (I'm assuming) databricks is creating 4 *.csv partitions. So I gather from the databricks documentation I need to coalesce the partitions files . So I'm am using the following command....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;df.coalesce(1).write.option("header","true").csv("dbfs:FileStore/temp/df.csv")&lt;/P&gt;&lt;P&gt;And then I receive  a NameError: name 'df' is not defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So am I missing a step, syntax wrong?  I'm working in a R Notebook&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 12:58:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-write-csv-file-from-databricks-filestore/m-p/23968#M16628</guid>
      <dc:creator>Jeff1</dc:creator>
      <dc:date>2022-04-01T12:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to write *.csv file from DataBricks FileStore</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-write-csv-file-from-databricks-filestore/m-p/23969#M16629</link>
      <description>&lt;P&gt;sparklyr has a different syntax. There is function sdf_coalesce.&lt;/P&gt;&lt;P&gt;The code which you paste is for Scala/Python. Additionally, even in python you can only specify folder not file so CSV("dbfs:FileStore/temp/")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 19:19:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-write-csv-file-from-databricks-filestore/m-p/23969#M16629</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-04-01T19:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to write *.csv file from DataBricks FileStore</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-write-csv-file-from-databricks-filestore/m-p/23970#M16630</link>
      <description>&lt;P&gt;Ok that helped. I was able to use the sdf_coalesce function and have 1 partition. Then how do I download it from DataBrick. I t provides a path and I would assume I have to combine it with some other portion of an html command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 19:51:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-write-csv-file-from-databricks-filestore/m-p/23970#M16630</guid>
      <dc:creator>Jeff1</dc:creator>
      <dc:date>2022-04-01T19:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to write *.csv file from DataBricks FileStore</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-write-csv-file-from-databricks-filestore/m-p/23971#M16631</link>
      <description>&lt;P&gt;@&lt;A href="https://community.databricks.com/s/profile/0053f000000WlPDAA0" alt="https://community.databricks.com/s/profile/0053f000000WlPDAA0" target="_blank"&gt;Jeff&lt;/A&gt;&amp;nbsp;(Customer), &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Mount your blob storage (or s3) to databricks and save it there. Then you can get it from a browser or using an app like storage explorer.&lt;/LI&gt;&lt;LI&gt;OR use display(your_dataframe) function - there is export option&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 01 Apr 2022 20:28:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-write-csv-file-from-databricks-filestore/m-p/23971#M16631</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-04-01T20:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to write *.csv file from DataBricks FileStore</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-write-csv-file-from-databricks-filestore/m-p/23973#M16633</link>
      <description>&lt;P&gt;Yes. Still don't understand why I couldn't use the python code after %python. But never the less Mr. Dudek  response corrected my course. I also was able to download the file to my local drive  after playing with the html path. The databricks documentation was not helpful, or maybe I just didn't find the correct help document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 12:22:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-write-csv-file-from-databricks-filestore/m-p/23973#M16633</guid>
      <dc:creator>Jeff1</dc:creator>
      <dc:date>2022-04-04T12:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to write *.csv file from DataBricks FileStore</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-write-csv-file-from-databricks-filestore/m-p/23975#M16635</link>
      <description>&lt;P&gt;Hi @Jeff Reichman​,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you saved the file to FileStore &lt;A href="https://docs.databricks.com/data/filestore.html#save-a-file-to-filestore" target="test_blank"&gt;https://docs.databricks.com/data/filestore.html#save-a-file-to-filestore&lt;/A&gt; then you can follow the instructions from here to be able to download it to your local machine &lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 18:06:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-write-csv-file-from-databricks-filestore/m-p/23975#M16635</guid>
      <dc:creator>jose_gonzalez</dc:creator>
      <dc:date>2022-06-07T18:06:29Z</dc:date>
    </item>
  </channel>
</rss>

