<?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: Incorrect dropped rows count in DLT Event log in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/incorrect-dropped-rows-count-in-dlt-event-log/m-p/51983#M29377</link>
    <description>&lt;P&gt;Tried updating the code to expect_all_drop, but it hasn't changed anything : the dropped records column is still 0. In which cases is this column filled ?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Nov 2023 07:42:18 GMT</pubDate>
    <dc:creator>erigaud</dc:creator>
    <dc:date>2023-11-15T07:42:18Z</dc:date>
    <item>
      <title>Incorrect dropped rows count in DLT Event log</title>
      <link>https://community.databricks.com/t5/data-engineering/incorrect-dropped-rows-count-in-dlt-event-log/m-p/51585#M29208</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using a DLT pipeline with expectations&lt;/P&gt;&lt;PRE&gt;expect_or_drop(...)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;To test it, I added files that contain records that should be dropped, and indeed when running the pipeline I can see some rows were dropped.&lt;/P&gt;&lt;P&gt;However when looking at the DLT Event logs, in the field&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;details.flow_progress.data_quality.dropped_records&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;I always get 0, and the number of failing rows are only available in the field&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;details.flow_progress.data_quality.expectations.failed_records&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Is this the expected behavior ?&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Nov 2023 13:23:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/incorrect-dropped-rows-count-in-dlt-event-log/m-p/51585#M29208</guid>
      <dc:creator>erigaud</dc:creator>
      <dc:date>2023-11-14T13:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect dropped rows count in DLT Event log</title>
      <link>https://community.databricks.com/t5/data-engineering/incorrect-dropped-rows-count-in-dlt-event-log/m-p/51927#M29353</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/84270"&gt;@erigaud&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue appears to be related to the details.flow_progress.data_quality.dropped_records field always being 0, despite records being dropped. This might be because the expect_or_drop operator isn't updating the dropped_records field in DLT Event logs, instead updating the failed_records field in the details.flow_progress.data_quality.expectations section. To confirm, check the DLT Event logs for the failed_records field. If it's updating correctly, the issue likely lies with the dropped_records field. To resolve this, try using the expect_all_or_drop operator, which should correctly update the dropped_records field. The code modification would look like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;&lt;BR /&gt;@dlt.table&lt;BR /&gt;@dlt.expect_all_or_drop({"valid_count": "count &amp;gt; 0", "valid_current_page": "current_page_id IS NOT NULL AND current_page_title IS NOT NULL"})&lt;BR /&gt;def raw_data():&lt;BR /&gt;# Create raw dataset&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 23:31:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/incorrect-dropped-rows-count-in-dlt-event-log/m-p/51927#M29353</guid>
      <dc:creator>Priyanka_Biswas</dc:creator>
      <dc:date>2023-11-14T23:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect dropped rows count in DLT Event log</title>
      <link>https://community.databricks.com/t5/data-engineering/incorrect-dropped-rows-count-in-dlt-event-log/m-p/51983#M29377</link>
      <description>&lt;P&gt;Tried updating the code to expect_all_drop, but it hasn't changed anything : the dropped records column is still 0. In which cases is this column filled ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 07:42:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/incorrect-dropped-rows-count-in-dlt-event-log/m-p/51983#M29377</guid>
      <dc:creator>erigaud</dc:creator>
      <dc:date>2023-11-15T07:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect dropped rows count in DLT Event log</title>
      <link>https://community.databricks.com/t5/data-engineering/incorrect-dropped-rows-count-in-dlt-event-log/m-p/53619#M29845</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand that dropped records and failed records are tracked separately, but my complaint is that the column for dropped records in my case is always 0, even though I have expectations that drop rows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I ran a workflow that dropped 5 rows due to an expect_or_drop expectation, and when I checked the event log I only saw 5 failed records and 0 dropped records. Is that normal or is it a bug ? It seems like dropped records aren't tracked properly.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 12:08:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/incorrect-dropped-rows-count-in-dlt-event-log/m-p/53619#M29845</guid>
      <dc:creator>erigaud</dc:creator>
      <dc:date>2023-11-23T12:08:19Z</dc:date>
    </item>
  </channel>
</rss>

