<?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 Lakeflow SDP expectations in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/lakeflow-sdp-expectations/m-p/153553#M53970</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to get number of warned records, dropped records , failed records for each expectation I see currently it gives aggregated count&lt;/P&gt;</description>
    <pubDate>Mon, 06 Apr 2026 18:25:44 GMT</pubDate>
    <dc:creator>IM_01</dc:creator>
    <dc:date>2026-04-06T18:25:44Z</dc:date>
    <item>
      <title>Lakeflow SDP expectations</title>
      <link>https://community.databricks.com/t5/data-engineering/lakeflow-sdp-expectations/m-p/153553#M53970</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to get number of warned records, dropped records , failed records for each expectation I see currently it gives aggregated count&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2026 18:25:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/lakeflow-sdp-expectations/m-p/153553#M53970</guid>
      <dc:creator>IM_01</dc:creator>
      <dc:date>2026-04-06T18:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Lakeflow SDP expectations</title>
      <link>https://community.databricks.com/t5/data-engineering/lakeflow-sdp-expectations/m-p/153555#M53971</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/193958"&gt;@IM_01&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You can’t change the UI to break out those numbers, but you can get per-expectation counts from the DLT (Lakeflow) event log. Each expectation entry records passed_records and failed_records; for EXPECT rules failed_records = warned rows, and for EXPECT … DROP ROW rules failed_records = dropped rows. Expectations configured with FAIL UPDATE don’t emit aggregate metrics.&lt;/P&gt;
&lt;P&gt;Here is a sample query you can run. Just replace the DLT table name where it says my_dlt_table&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;WITH exploded AS (
  SELECT
    timestamp,
    explode(
      from_json(
        details:flow_progress:data_quality:expectations,
        'array&amp;lt;struct&amp;lt;name:string,dataset:string,passed_records:long,failed_records:long&amp;gt;&amp;gt;'
      )
    ) AS e
  FROM event_log(TABLE(my_dlt_table))
  WHERE details:flow_progress:data_quality IS NOT NULL
)
SELECT
  timestamp,
  e.name           AS expectation_name,
  e.dataset,
  e.passed_records,
  e.failed_records
FROM exploded
ORDER BY timestamp DESC, expectation_name;&lt;/LI-CODE&gt;
&lt;P&gt;I tested it for a sample table and it returned the split. I'm guessing this is what you want to see?&lt;/P&gt;
&lt;DIV id="tinyMceEditor_168935259e0521Ashwin_DSA_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="DLT_Expectations.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/25717i986B9C218DF6BC3E/image-size/large?v=v2&amp;amp;px=999" role="button" title="DLT_Expectations.png" alt="DLT_Expectations.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can also take a look at the documentation &lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://docs.databricks.com/aws/en/ldp/monitor-event-logs#data-quality-metrics" target="_blank"&gt;here&lt;/A&gt;&lt;SPAN&gt; for exploring&amp;nbsp;data quality / expectations metrics from the event log.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P class="p1"&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;STRONG&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2026 19:05:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/lakeflow-sdp-expectations/m-p/153555#M53971</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-04-06T19:05:16Z</dc:date>
    </item>
  </channel>
</rss>

