<?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 only file on to the Blob or ADLS from Databricks? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-write-only-file-on-to-the-blob-or-adls-from-databricks/m-p/57605#M30841</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/98328"&gt;@Simha&lt;/a&gt;&amp;nbsp;, This is expected behavior. Spark always creates an output directory when writing the data and it divides the result into multiple part files. This is because multiple executors write the result into the output directory. We cannot make the spark write the file without creating the output directory.&lt;/P&gt;
&lt;P&gt;But we can control the no. of part files that are written in output directory by using the coalesce function. To get a single file output, you can use coalesce(1) while doing the write operation. However, I would advise you to decide the coalesce partition carefully as coalesce(1) would bring all the data to single executor and if the data volume is huge, this can lead to executor going OOM.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2024 15:49:03 GMT</pubDate>
    <dc:creator>Lakshay</dc:creator>
    <dc:date>2024-01-17T15:49:03Z</dc:date>
    <item>
      <title>How to write only file on to the Blob or ADLS from Databricks?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-write-only-file-on-to-the-blob-or-adls-from-databricks/m-p/57582#M30834</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am trying to write a csv file on to the blob and ADLS from databricks notebook using pyspark and a separate folder is created with the mentioned filename and a partition is created within the folder.&lt;/P&gt;&lt;P&gt;I want only file to be written.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me to fix this issue.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 12:43:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-write-only-file-on-to-the-blob-or-adls-from-databricks/m-p/57582#M30834</guid>
      <dc:creator>Simha</dc:creator>
      <dc:date>2024-01-17T12:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to write only file on to the Blob or ADLS from Databricks?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-write-only-file-on-to-the-blob-or-adls-from-databricks/m-p/57605#M30841</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/98328"&gt;@Simha&lt;/a&gt;&amp;nbsp;, This is expected behavior. Spark always creates an output directory when writing the data and it divides the result into multiple part files. This is because multiple executors write the result into the output directory. We cannot make the spark write the file without creating the output directory.&lt;/P&gt;
&lt;P&gt;But we can control the no. of part files that are written in output directory by using the coalesce function. To get a single file output, you can use coalesce(1) while doing the write operation. However, I would advise you to decide the coalesce partition carefully as coalesce(1) would bring all the data to single executor and if the data volume is huge, this can lead to executor going OOM.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 15:49:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-write-only-file-on-to-the-blob-or-adls-from-databricks/m-p/57605#M30841</guid>
      <dc:creator>Lakshay</dc:creator>
      <dc:date>2024-01-17T15:49:03Z</dc:date>
    </item>
  </channel>
</rss>

