lib/google/apis/dataplex_v1/classes.rb in google-apis-dataplex_v1-0.52.0 vs lib/google/apis/dataplex_v1/classes.rb in google-apis-dataplex_v1-0.53.0
- old
+ new
@@ -2278,10 +2278,20 @@
# Evaluates whether each column value is contained by a specified set.
# Corresponds to the JSON property `setExpectation`
# @return [Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleSetExpectation]
attr_accessor :set_expectation
+ # Queries for rows returned by the provided SQL statement. If any rows are are
+ # returned, this rule fails.The SQL statement needs to use BigQuery standard SQL
+ # syntax, and must not contain any semicolons.$`data()` can be used to reference
+ # the rows being evaluated, i.e. the table after all additional filters (row
+ # filters, incremental data filters, sampling) are applied.Example: SELECT *
+ # FROM $`data()` WHERE price < 0
+ # Corresponds to the JSON property `sqlAssertion`
+ # @return [Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleSqlAssertion]
+ attr_accessor :sql_assertion
+
# Evaluates whether the column aggregate statistic lies between a specified
# range.
# Corresponds to the JSON property `statisticRangeExpectation`
# @return [Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleStatisticRangeExpectation]
attr_accessor :statistic_range_expectation
@@ -2319,10 +2329,11 @@
@non_null_expectation = args[:non_null_expectation] if args.key?(:non_null_expectation)
@range_expectation = args[:range_expectation] if args.key?(:range_expectation)
@regex_expectation = args[:regex_expectation] if args.key?(:regex_expectation)
@row_condition_expectation = args[:row_condition_expectation] if args.key?(:row_condition_expectation)
@set_expectation = args[:set_expectation] if args.key?(:set_expectation)
+ @sql_assertion = args[:sql_assertion] if args.key?(:sql_assertion)
@statistic_range_expectation = args[:statistic_range_expectation] if args.key?(:statistic_range_expectation)
@table_condition_expectation = args[:table_condition_expectation] if args.key?(:table_condition_expectation)
@threshold = args[:threshold] if args.key?(:threshold)
@uniqueness_expectation = args[:uniqueness_expectation] if args.key?(:uniqueness_expectation)
end
@@ -2407,10 +2418,16 @@
# DataQualityRuleResult provides a more detailed, per-rule view of the results.
class GoogleCloudDataplexV1DataQualityRuleResult
include Google::Apis::Core::Hashable
+ # Output only. The number of rows returned by the sql statement in the
+ # SqlAssertion rule.This field is only valid for SqlAssertion rules.
+ # Corresponds to the JSON property `assertionRowCount`
+ # @return [Fixnum]
+ attr_accessor :assertion_row_count
+
# The number of rows a rule was evaluated against.This field is only valid for
# row-level type rules.Evaluated count can be configured to either include all
# rows (default) - with null rows automatically failing rule evaluation, or
# exclude null rows from the evaluated_count, by setting ignore_nulls = true.
# Corresponds to the JSON property `evaluatedCount`
@@ -2455,10 +2472,11 @@
update!(**args)
end
# Update properties of this object
def update!(**args)
+ @assertion_row_count = args[:assertion_row_count] if args.key?(:assertion_row_count)
@evaluated_count = args[:evaluated_count] if args.key?(:evaluated_count)
@failing_rows_query = args[:failing_rows_query] if args.key?(:failing_rows_query)
@null_count = args[:null_count] if args.key?(:null_count)
@pass_ratio = args[:pass_ratio] if args.key?(:pass_ratio)
@passed = args[:passed] if args.key?(:passed)
@@ -2502,9 +2520,33 @@
end
# Update properties of this object
def update!(**args)
@values = args[:values] if args.key?(:values)
+ end
+ end
+
+ # Queries for rows returned by the provided SQL statement. If any rows are are
+ # returned, this rule fails.The SQL statement needs to use BigQuery standard SQL
+ # syntax, and must not contain any semicolons.$`data()` can be used to reference
+ # the rows being evaluated, i.e. the table after all additional filters (row
+ # filters, incremental data filters, sampling) are applied.Example: SELECT *
+ # FROM $`data()` WHERE price < 0
+ class GoogleCloudDataplexV1DataQualityRuleSqlAssertion
+ include Google::Apis::Core::Hashable
+
+ # Optional. The SQL statement.
+ # Corresponds to the JSON property `sqlStatement`
+ # @return [String]
+ attr_accessor :sql_statement
+
+ def initialize(**args)
+ update!(**args)
+ end
+
+ # Update properties of this object
+ def update!(**args)
+ @sql_statement = args[:sql_statement] if args.key?(:sql_statement)
end
end
# Evaluates whether the column aggregate statistic lies between a specified
# range.