<?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 How do i stop pyspark from outputting text in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-do-i-stop-pyspark-from-outputting-text/m-p/68324#M33638</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I am using a tqdm progress bar to monitor the amount of data records I have collected via API. I am temporarily writing them to a file in the DBFS, then uploading to a Spark DataFrame. Each time I write to a file, I get a message like 'Wrote 8873925 bytes.' How do I stop it from outputting this?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 07 May 2024 02:40:59 GMT</pubDate>
    <dc:creator>halox6000</dc:creator>
    <dc:date>2024-05-07T02:40:59Z</dc:date>
    <item>
      <title>How do i stop pyspark from outputting text</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-i-stop-pyspark-from-outputting-text/m-p/68324#M33638</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am using a tqdm progress bar to monitor the amount of data records I have collected via API. I am temporarily writing them to a file in the DBFS, then uploading to a Spark DataFrame. Each time I write to a file, I get a message like 'Wrote 8873925 bytes.' How do I stop it from outputting this?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 02:40:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-i-stop-pyspark-from-outputting-text/m-p/68324#M33638</guid>
      <dc:creator>halox6000</dc:creator>
      <dc:date>2024-05-07T02:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do i stop pyspark from outputting text</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-i-stop-pyspark-from-outputting-text/m-p/105919#M42314</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/103385"&gt;@halox6000&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You could temporarily redirect console output to a null device for these write operations.&lt;/P&gt;
&lt;P&gt;Try this out:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;@contextlib.contextmanager
def silence_dbutils():
    with contextlib.redirect_stdout(io.StringIO()):
        yield

# Usage in your code
with silence_dbutils():
    dbutils.fs.put("/path/to/your/file.txt", "Your content here", True)
&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 16 Jan 2025 14:31:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-i-stop-pyspark-from-outputting-text/m-p/105919#M42314</guid>
      <dc:creator>MathieuDB</dc:creator>
      <dc:date>2025-01-16T14:31:11Z</dc:date>
    </item>
  </channel>
</rss>

