phanikumv commented on code in PR #66849:
URL: https://github.com/apache/airflow/pull/66849#discussion_r3233196332


##########
providers/common/sql/src/airflow/providers/common/sql/operators/sql.py:
##########
@@ -127,6 +130,46 @@ def default_output_processor(results: list[Any], 
descriptions: list[Sequence[Seq
     return results
 
 
+@dataclass
+class SQLCheckResult:
+    """Record of a single SQL check result."""
+
+    name: str
+    """Unique name identifying this check."""
+
+    check_type: str
+    """Classification of the check, e.g. ``"not_null"``, ``"row_count"``, 
``"unique"``."""
+
+    success: bool
+    """Whether the check found no issues (``True``) or found issues 
(``False``)."""
+
+    severity: str = "error"
+    """How severe a failure of this check is: ``"error"`` (raises, default), 
``"warn"`` (logs a warning only),
+     or ``"info"`` (informational, never causes task failure, like branching 
operator)."""
+
+    column: str | None = None
+    """Column the check refers to. When set, the assertion targets a specific 
column rather than
+    the whole table. Should match the column name in the schema."""
+
+    table: str | None = None
+    """Table the check was performed against."""
+
+    expected: str | None = None
+    """The expected value or threshold, serialized as a string, e.g. ``"> 0"`` 
or ``"[10, 100]"``."""
+
+    actual: str | None = None
+    """The actual value observed during the check, serialized as a string."""
+
+    content: str | None = None
+    """The check body — typically the SQL expression used to perform the 
check."""
+
+    description: str | None = None
+    """Human-readable description of what the check verifies."""
+
+    params: dict | None = field(default=None)

Review Comment:
   ```suggestion
       params: dict | None = None
   ```
   
   Minor nit on 
`providers/common/sql/src/airflow/providers/common/sql/operators/sql.py`, in 
the new `SQLCheckResult` dataclass



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to