<?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 Same path producing different counts on Databricks and EMR in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/same-path-producing-different-counts-on-databricks-and-emr/m-p/57909#M30954</link>
    <description>&lt;P&gt;We're in the middle of migrating to Databricks and found that the same path on s3 is producing different counts between EMR (Spark 2.4.4) and Databricks (Spark 3.4.1) it is a simple spark.read.parquet().count(), tried multiple solutions like making the spark configs across both the same, but still consistently giving the same counts.&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jan 2024 18:59:35 GMT</pubDate>
    <dc:creator>Vishwanath_Rao</dc:creator>
    <dc:date>2024-01-19T18:59:35Z</dc:date>
    <item>
      <title>Same path producing different counts on Databricks and EMR</title>
      <link>https://community.databricks.com/t5/data-engineering/same-path-producing-different-counts-on-databricks-and-emr/m-p/57909#M30954</link>
      <description>&lt;P&gt;We're in the middle of migrating to Databricks and found that the same path on s3 is producing different counts between EMR (Spark 2.4.4) and Databricks (Spark 3.4.1) it is a simple spark.read.parquet().count(), tried multiple solutions like making the spark configs across both the same, but still consistently giving the same counts.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 18:59:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/same-path-producing-different-counts-on-databricks-and-emr/m-p/57909#M30954</guid>
      <dc:creator>Vishwanath_Rao</dc:creator>
      <dc:date>2024-01-19T18:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Same path producing different counts on Databricks and EMR</title>
      <link>https://community.databricks.com/t5/data-engineering/same-path-producing-different-counts-on-databricks-and-emr/m-p/57957#M30967</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The discrepancy in counts between EMR (Spark 2.4.4) and Databricks (Spark 3.4.1) could be due to several reasons:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;1. Different versions of Spark: The two environments are running different versions of Spark which might have different optimizations or behaviors that could affect the count.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;2.Differences in reading data from S3: There might be differences in how the two environments read data from S3. For example, they might handle partition discovery differently, or there might be differences in how they handle corrupt or invalid data.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;3. Use of Delta format: Databricks recommends using Delta format instead of Parquet for efficiency and ACID transaction guarantees. If you are using Parquet in Databricks, it might be worth trying to convert the data to Delta format and see if that resolves the discrepancy.&lt;BR /&gt;Based on the given information few validations or suggestions will be:&lt;BR /&gt;- Check for corrupt or invalid data: If there are corrupt or invalid Parquet files in S3, they might be handled differently by the two environments.&lt;BR /&gt;- Try using Delta format: As recommended by Databricks, try converting the data to Delta format and see if that resolves the discrepancy.&lt;BR /&gt;&lt;BR /&gt;Additional resources:&amp;nbsp;&lt;A href="https://docs.databricks.com/en/migration/spark.html#" target="_blank"&gt;https://docs.databricks.com/en/migration/spark.html#&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 17:24:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/same-path-producing-different-counts-on-databricks-and-emr/m-p/57957#M30967</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-01-20T17:24:43Z</dc:date>
    </item>
  </channel>
</rss>

