<?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 Databricks pipeline fails expectation on execute python script, throws error: Update FAILES in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/databricks-pipeline-fails-expectation-on-execute-python-script/m-p/141616#M51770</link>
    <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;I'm new to Databricks and am trying to make and implement pipeline expectations, The pipelines work without errors and my job works. I've tried multiple ways to implement expectations, sql and python. I keep resolving the errors but end up with the same error. I'm working with the free trial version of Databricks. Is there a limitation to building expectations on the trial version? Are there table permissions in databricks I'm not taking into account?&amp;nbsp;The order_2 table is a streaming table, are there limitations to applying expectations to streaming tables?&amp;nbsp; &amp;nbsp;My python code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%python
from pyspark import pipelines as dp
from pyspark.sql.functions import col

@dp.table(
    name="xyntrel_bronze.bronze.orders_2",
    comment="Orders table with data quality constraints"
)
@dp.expect_or_fail("row count &amp;gt; 100", "COUNT(*) &amp;gt; 100")
@dp.expect_or_fail("customer_id not null", "customer_id IS NOT NULL") 
def bronze_table():
    return (
        spark.readStream.table("xyntrel_bronze.bronze.orders_2")
        .filter(col("order_id").isNotNull())
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The complete error in json:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"timestamp": "2025-12-10T18:23:25.679Z",
    "message": "Update 19907c is FAILED.",
    "level": "ERROR",
    "error": {
        "exceptions": [
            {
                "message": "",
                "error_class": "_UNCLASSIFIED_PYTHON_COMMAND_ERROR",
                "short_message": ""
            }
        ],
        "fatal": true
    },
    "details": {
        "update_progress": {
            "state": "FAILED"
        }
    },
    "event_type": "update_progress",
    "maturity_level": "STABLE"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Thanks guys!&lt;/P&gt;</description>
    <pubDate>Wed, 10 Dec 2025 18:46:09 GMT</pubDate>
    <dc:creator>RobFer1985</dc:creator>
    <dc:date>2025-12-10T18:46:09Z</dc:date>
    <item>
      <title>Databricks pipeline fails expectation on execute python script, throws error: Update FAILES</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-pipeline-fails-expectation-on-execute-python-script/m-p/141616#M51770</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;I'm new to Databricks and am trying to make and implement pipeline expectations, The pipelines work without errors and my job works. I've tried multiple ways to implement expectations, sql and python. I keep resolving the errors but end up with the same error. I'm working with the free trial version of Databricks. Is there a limitation to building expectations on the trial version? Are there table permissions in databricks I'm not taking into account?&amp;nbsp;The order_2 table is a streaming table, are there limitations to applying expectations to streaming tables?&amp;nbsp; &amp;nbsp;My python code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%python
from pyspark import pipelines as dp
from pyspark.sql.functions import col

@dp.table(
    name="xyntrel_bronze.bronze.orders_2",
    comment="Orders table with data quality constraints"
)
@dp.expect_or_fail("row count &amp;gt; 100", "COUNT(*) &amp;gt; 100")
@dp.expect_or_fail("customer_id not null", "customer_id IS NOT NULL") 
def bronze_table():
    return (
        spark.readStream.table("xyntrel_bronze.bronze.orders_2")
        .filter(col("order_id").isNotNull())
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The complete error in json:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"timestamp": "2025-12-10T18:23:25.679Z",
    "message": "Update 19907c is FAILED.",
    "level": "ERROR",
    "error": {
        "exceptions": [
            {
                "message": "",
                "error_class": "_UNCLASSIFIED_PYTHON_COMMAND_ERROR",
                "short_message": ""
            }
        ],
        "fatal": true
    },
    "details": {
        "update_progress": {
            "state": "FAILED"
        }
    },
    "event_type": "update_progress",
    "maturity_level": "STABLE"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Thanks guys!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Dec 2025 18:46:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-pipeline-fails-expectation-on-execute-python-script/m-p/141616#M51770</guid>
      <dc:creator>RobFer1985</dc:creator>
      <dc:date>2025-12-10T18:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks pipeline fails expectation on execute python script, throws error: Update FAILES</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-pipeline-fails-expectation-on-execute-python-script/m-p/141673#M51785</link>
      <description>&lt;P&gt;Hey,&amp;nbsp; I think it may be the row_count condition causing the issue. The expectation runs on each row and sees if the record meets the criteria in the expectation, so you're effectively asking count * on each record, which will always evaluate to 1 and therefore always fail your condition. I hope this helps.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 13:59:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-pipeline-fails-expectation-on-execute-python-script/m-p/141673#M51785</guid>
      <dc:creator>emma_s</dc:creator>
      <dc:date>2025-12-11T13:59:36Z</dc:date>
    </item>
  </channel>
</rss>

