Class: Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRule
- Inherits:
-
Object
- Object
- Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRule
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/dataplex_v1/classes.rb,
lib/google/apis/dataplex_v1/representations.rb,
lib/google/apis/dataplex_v1/representations.rb
Overview
A rule captures data quality intent about a data source.
Instance Attribute Summary collapse
-
#column ⇒ String
Optional.
-
#dimension ⇒ String
Required.
-
#ignore_null ⇒ Boolean
(also: #ignore_null?)
Optional.
-
#non_null_expectation ⇒ Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleNonNullExpectation
Evaluates whether each column value is null.
-
#range_expectation ⇒ Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleRangeExpectation
Evaluates whether each column value lies between a specified range.
-
#regex_expectation ⇒ Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleRegexExpectation
Evaluates whether each column value matches a specified regex.
-
#row_condition_expectation ⇒ Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleRowConditionExpectation
Evaluates whether each row passes the specified condition.The SQL expression needs to use BigQuery standard SQL syntax and should produce a boolean value per row as the result.Example: col1 >= 0 AND col2 < 10 Corresponds to the JSON property
rowConditionExpectation. -
#set_expectation ⇒ Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleSetExpectation
Evaluates whether each column value is contained by a specified set.
-
#statistic_range_expectation ⇒ Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleStatisticRangeExpectation
Evaluates whether the column aggregate statistic lies between a specified range.
-
#table_condition_expectation ⇒ Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleTableConditionExpectation
Evaluates whether the provided expression is true.The SQL expression needs to use BigQuery standard SQL syntax and should produce a scalar boolean result.
-
#threshold ⇒ Float
Optional.
-
#uniqueness_expectation ⇒ Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleUniquenessExpectation
Evaluates whether the column has duplicates.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDataplexV1DataQualityRule
constructor
A new instance of GoogleCloudDataplexV1DataQualityRule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDataplexV1DataQualityRule
Returns a new instance of GoogleCloudDataplexV1DataQualityRule.
1622 1623 1624 |
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1622 def initialize(**args) update!(**args) end |
Instance Attribute Details
#column ⇒ String
Optional. The unnested column which this rule is evaluated against.
Corresponds to the JSON property column
1554 1555 1556 |
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1554 def column @column end |
#dimension ⇒ String
Required. The dimension a rule belongs to. Results are also aggregated at the
dimension level. Supported dimensions are "COMPLETENESS", "ACCURACY", "
CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"
Corresponds to the JSON property dimension
1561 1562 1563 |
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1561 def dimension @dimension end |
#ignore_null ⇒ Boolean Also known as: ignore_null?
Optional. Rows with null values will automatically fail a rule, unless
ignore_null is true. In that case, such null rows are trivially considered
passing.Only applicable to ColumnMap rules.
Corresponds to the JSON property ignoreNull
1568 1569 1570 |
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1568 def ignore_null @ignore_null end |
#non_null_expectation ⇒ Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleNonNullExpectation
Evaluates whether each column value is null.
Corresponds to the JSON property nonNullExpectation
1574 1575 1576 |
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1574 def non_null_expectation @non_null_expectation end |
#range_expectation ⇒ Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleRangeExpectation
Evaluates whether each column value lies between a specified range.
Corresponds to the JSON property rangeExpectation
1579 1580 1581 |
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1579 def range_expectation @range_expectation end |
#regex_expectation ⇒ Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleRegexExpectation
Evaluates whether each column value matches a specified regex.
Corresponds to the JSON property regexExpectation
1584 1585 1586 |
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1584 def regex_expectation @regex_expectation end |
#row_condition_expectation ⇒ Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleRowConditionExpectation
Evaluates whether each row passes the specified condition.The SQL expression
needs to use BigQuery standard SQL syntax and should produce a boolean value
per row as the result.Example: col1 >= 0 AND col2 < 10
Corresponds to the JSON property rowConditionExpectation
1591 1592 1593 |
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1591 def row_condition_expectation @row_condition_expectation end |
#set_expectation ⇒ Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleSetExpectation
Evaluates whether each column value is contained by a specified set.
Corresponds to the JSON property setExpectation
1596 1597 1598 |
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1596 def set_expectation @set_expectation end |
#statistic_range_expectation ⇒ Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleStatisticRangeExpectation
Evaluates whether the column aggregate statistic lies between a specified
range.
Corresponds to the JSON property statisticRangeExpectation
1602 1603 1604 |
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1602 def statistic_range_expectation @statistic_range_expectation end |
#table_condition_expectation ⇒ Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleTableConditionExpectation
Evaluates whether the provided expression is true.The SQL expression needs to
use BigQuery standard SQL syntax and should produce a scalar boolean result.
Example: MIN(col1) >= 0
Corresponds to the JSON property tableConditionExpectation
1609 1610 1611 |
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1609 def table_condition_expectation @table_condition_expectation end |
#threshold ⇒ Float
Optional. The minimum ratio of passing_rows / total_rows required to pass this
rule, with a range of 0.0, 1.0.0 indicates default value (i.e. 1.0).
Corresponds to the JSON property threshold
1615 1616 1617 |
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1615 def threshold @threshold end |
#uniqueness_expectation ⇒ Google::Apis::DataplexV1::GoogleCloudDataplexV1DataQualityRuleUniquenessExpectation
Evaluates whether the column has duplicates.
Corresponds to the JSON property uniquenessExpectation
1620 1621 1622 |
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1620 def uniqueness_expectation @uniqueness_expectation end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 |
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1627 def update!(**args) @column = args[:column] if args.key?(:column) @dimension = args[:dimension] if args.key?(:dimension) @ignore_null = args[:ignore_null] if args.key?(:ignore_null) @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) @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 |