<?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: Disk cache for csv file in Databricks in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/disk-cache-for-csv-file-in-databricks/m-p/70380#M34063</link>
    <description>&lt;P&gt;The answer is "yes but".&lt;BR /&gt;If you read a csv into a dataframe, and apply a cache action, no matter what file format, it will be cached (if spark can read it of course).&lt;BR /&gt;That being said: spark applies lazy evaluation. So this means the csv is only actually read when an action is executed (like write, count, ...).&amp;nbsp; Before that Spark will only generate a query plan.&lt;BR /&gt;So to speed up your code, it is important to find out what the best location is to apply the cache.&amp;nbsp; Because caching is an expensive operation (it actually writes the data to disk) and it will only come in handy if the cached dataframe is used more than once afterwards.&lt;BR /&gt;Not sure if that makes sense?&lt;/P&gt;</description>
    <pubDate>Thu, 23 May 2024 09:30:30 GMT</pubDate>
    <dc:creator>-werners-</dc:creator>
    <dc:date>2024-05-23T09:30:30Z</dc:date>
    <item>
      <title>Disk cache for csv file in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/disk-cache-for-csv-file-in-databricks/m-p/70358#M34057</link>
      <description>&lt;P&gt;Dear team,&lt;/P&gt;&lt;P&gt;I'm investigate to improve performance when reading large csv file as input and find this&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/optimizations/disk-cache" target="_blank"&gt;https://learn.microsoft.com/en-us/azure/databricks/optimizations/disk-cache.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I just wonder Do disk-cache also apply for csv file?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 06:57:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/disk-cache-for-csv-file-in-databricks/m-p/70358#M34057</guid>
      <dc:creator>NhanNguyen</dc:creator>
      <dc:date>2024-05-23T06:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Disk cache for csv file in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/disk-cache-for-csv-file-in-databricks/m-p/70380#M34063</link>
      <description>&lt;P&gt;The answer is "yes but".&lt;BR /&gt;If you read a csv into a dataframe, and apply a cache action, no matter what file format, it will be cached (if spark can read it of course).&lt;BR /&gt;That being said: spark applies lazy evaluation. So this means the csv is only actually read when an action is executed (like write, count, ...).&amp;nbsp; Before that Spark will only generate a query plan.&lt;BR /&gt;So to speed up your code, it is important to find out what the best location is to apply the cache.&amp;nbsp; Because caching is an expensive operation (it actually writes the data to disk) and it will only come in handy if the cached dataframe is used more than once afterwards.&lt;BR /&gt;Not sure if that makes sense?&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 09:30:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/disk-cache-for-csv-file-in-databricks/m-p/70380#M34063</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2024-05-23T09:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Disk cache for csv file in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/disk-cache-for-csv-file-in-databricks/m-p/70381#M34064</link>
      <description>&lt;P&gt;To add on that: Disk cache (formerly detla cache/dbio cache) automates some things, but the principle remains:&lt;BR /&gt;you will only gain if the cached df is used multiple times.&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 09:33:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/disk-cache-for-csv-file-in-databricks/m-p/70381#M34064</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2024-05-23T09:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Disk cache for csv file in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/disk-cache-for-csv-file-in-databricks/m-p/70520#M34085</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/14792"&gt;@-werners-&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;That's right, I tried and get some&amp;nbsp;significantly performance.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 16:00:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/disk-cache-for-csv-file-in-databricks/m-p/70520#M34085</guid>
      <dc:creator>NhanNguyen</dc:creator>
      <dc:date>2024-05-23T16:00:53Z</dc:date>
    </item>
  </channel>
</rss>

