Reference documentation and code samples for the Cloud Dataplex v1 API class DataQualityRule.Types.SqlAssertion.
A SQL statement that is evaluated to return rows that match an invalid
state. If any rows are are returned, this rule fails.
The SQL statement must use GoogleSQL
syntax,
and must not contain any semicolons.
You can use the data reference parameter ${data()} to reference the
source table with all of its precondition filters applied. Examples of
precondition filters include row filters, incremental data filters, and
sampling. For more information, see Data reference
parameter.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version available for \u003ccode\u003eDataQualityRule.Types.SqlAssertion\u003c/code\u003e is 3.6.0, with a range of versions from 1.0.0 to 3.6.0 documented.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDataQualityRule.Types.SqlAssertion\u003c/code\u003e is a class within the Google Cloud Dataplex V1 API, specifically designed for defining SQL-based data quality assertions.\u003c/p\u003e\n"],["\u003cp\u003eThis class allows users to specify a SQL statement (\u003ccode\u003eSqlStatement\u003c/code\u003e) that, when executed, will flag rows matching an invalid state, with the failure of the rule if rows are returned.\u003c/p\u003e\n"],["\u003cp\u003eThe SQL statements must adhere to BigQuery standard SQL syntax and can utilize the \u003ccode\u003e${data()}\u003c/code\u003e parameter to reference the source table, taking into account any specified precondition filters.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDataQualityRule.Types.SqlAssertion\u003c/code\u003e implements multiple interfaces, including IMessage, IEquatable, IDeepCloneable, and IBufferMessage.\u003c/p\u003e\n"]]],[],null,[]]