Dataplex V1 API - Class Google::Cloud::Dataplex::V1::DataQualityRule (v1.4.0)

Reference documentation and code samples for the Dataplex V1 API class Google::Cloud::Dataplex::V1::DataQualityRule.

A rule captures data quality intent about a data source.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#column

def column() -> ::String
Returns
  • (::String) — Optional. The unnested column which this rule is evaluated against.

#column=

def column=(value) -> ::String
Parameter
  • value (::String) — Optional. The unnested column which this rule is evaluated against.
Returns
  • (::String) — Optional. The unnested column which this rule is evaluated against.

#description

def description() -> ::String
Returns
  • (::String) —

    Optional. Description of the rule.

    • The maximum length is 1,024 characters.

#description=

def description=(value) -> ::String
Parameter
  • value (::String) —

    Optional. Description of the rule.

    • The maximum length is 1,024 characters.
Returns
  • (::String) —

    Optional. Description of the rule.

    • The maximum length is 1,024 characters.

#dimension

def dimension() -> ::String
Returns
  • (::String) — Required. The dimension a rule belongs to. Results are also aggregated at the dimension level. Supported dimensions are ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "FRESHNESS", "VOLUME"]

#dimension=

def dimension=(value) -> ::String
Parameter
  • value (::String) — Required. The dimension a rule belongs to. Results are also aggregated at the dimension level. Supported dimensions are ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "FRESHNESS", "VOLUME"]
Returns
  • (::String) — Required. The dimension a rule belongs to. Results are also aggregated at the dimension level. Supported dimensions are ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "FRESHNESS", "VOLUME"]

#ignore_null

def ignore_null() -> ::Boolean
Returns
  • (::Boolean) —

    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.

    This field is only valid for the following type of rules:

    • RangeExpectation
    • RegexExpectation
    • SetExpectation
    • UniquenessExpectation

#ignore_null=

def ignore_null=(value) -> ::Boolean
Parameter
  • value (::Boolean) —

    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.

    This field is only valid for the following type of rules:

    • RangeExpectation
    • RegexExpectation
    • SetExpectation
    • UniquenessExpectation
Returns
  • (::Boolean) —

    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.

    This field is only valid for the following type of rules:

    • RangeExpectation
    • RegexExpectation
    • SetExpectation
    • UniquenessExpectation

#name

def name() -> ::String
Returns
  • (::String) —

    Optional. A mutable name for the rule.

    • The name must contain only letters (a-z, A-Z), numbers (0-9), or hyphens (-).
    • The maximum length is 63 characters.
    • Must start with a letter.
    • Must end with a number or a letter.

#name=

def name=(value) -> ::String
Parameter
  • value (::String) —

    Optional. A mutable name for the rule.

    • The name must contain only letters (a-z, A-Z), numbers (0-9), or hyphens (-).
    • The maximum length is 63 characters.
    • Must start with a letter.
    • Must end with a number or a letter.
Returns
  • (::String) —

    Optional. A mutable name for the rule.

    • The name must contain only letters (a-z, A-Z), numbers (0-9), or hyphens (-).
    • The maximum length is 63 characters.
    • Must start with a letter.
    • Must end with a number or a letter.

#non_null_expectation

def non_null_expectation() -> ::Google::Cloud::Dataplex::V1::DataQualityRule::NonNullExpectation
Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::NonNullExpectation) — Row-level rule which evaluates whether each column value is null.

    Note: The following fields are mutually exclusive: non_null_expectation, range_expectation, set_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

#non_null_expectation=

def non_null_expectation=(value) -> ::Google::Cloud::Dataplex::V1::DataQualityRule::NonNullExpectation
Parameter
  • value (::Google::Cloud::Dataplex::V1::DataQualityRule::NonNullExpectation) — Row-level rule which evaluates whether each column value is null.

    Note: The following fields are mutually exclusive: non_null_expectation, range_expectation, set_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::NonNullExpectation) — Row-level rule which evaluates whether each column value is null.

    Note: The following fields are mutually exclusive: non_null_expectation, range_expectation, set_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

#range_expectation

def range_expectation() -> ::Google::Cloud::Dataplex::V1::DataQualityRule::RangeExpectation
Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::RangeExpectation) — Row-level rule which evaluates whether each column value lies between a specified range.

    Note: The following fields are mutually exclusive: range_expectation, non_null_expectation, set_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

#range_expectation=

def range_expectation=(value) -> ::Google::Cloud::Dataplex::V1::DataQualityRule::RangeExpectation
Parameter
  • value (::Google::Cloud::Dataplex::V1::DataQualityRule::RangeExpectation) — Row-level rule which evaluates whether each column value lies between a specified range.

    Note: The following fields are mutually exclusive: range_expectation, non_null_expectation, set_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::RangeExpectation) — Row-level rule which evaluates whether each column value lies between a specified range.

    Note: The following fields are mutually exclusive: range_expectation, non_null_expectation, set_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

#regex_expectation

def regex_expectation() -> ::Google::Cloud::Dataplex::V1::DataQualityRule::RegexExpectation
Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::RegexExpectation) — Row-level rule which evaluates whether each column value matches a specified regex.

    Note: The following fields are mutually exclusive: regex_expectation, range_expectation, non_null_expectation, set_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

#regex_expectation=

def regex_expectation=(value) -> ::Google::Cloud::Dataplex::V1::DataQualityRule::RegexExpectation
Parameter
  • value (::Google::Cloud::Dataplex::V1::DataQualityRule::RegexExpectation) — Row-level rule which evaluates whether each column value matches a specified regex.

    Note: The following fields are mutually exclusive: regex_expectation, range_expectation, non_null_expectation, set_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::RegexExpectation) — Row-level rule which evaluates whether each column value matches a specified regex.

    Note: The following fields are mutually exclusive: regex_expectation, range_expectation, non_null_expectation, set_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

#row_condition_expectation

def row_condition_expectation() -> ::Google::Cloud::Dataplex::V1::DataQualityRule::RowConditionExpectation
Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::RowConditionExpectation) — Row-level rule which evaluates whether each row in a table passes the specified condition.

    Note: The following fields are mutually exclusive: row_condition_expectation, range_expectation, non_null_expectation, set_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

#row_condition_expectation=

def row_condition_expectation=(value) -> ::Google::Cloud::Dataplex::V1::DataQualityRule::RowConditionExpectation
Parameter
  • value (::Google::Cloud::Dataplex::V1::DataQualityRule::RowConditionExpectation) — Row-level rule which evaluates whether each row in a table passes the specified condition.

    Note: The following fields are mutually exclusive: row_condition_expectation, range_expectation, non_null_expectation, set_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::RowConditionExpectation) — Row-level rule which evaluates whether each row in a table passes the specified condition.

    Note: The following fields are mutually exclusive: row_condition_expectation, range_expectation, non_null_expectation, set_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

#set_expectation

def set_expectation() -> ::Google::Cloud::Dataplex::V1::DataQualityRule::SetExpectation
Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::SetExpectation) — Row-level rule which evaluates whether each column value is contained by a specified set.

    Note: The following fields are mutually exclusive: set_expectation, range_expectation, non_null_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

#set_expectation=

def set_expectation=(value) -> ::Google::Cloud::Dataplex::V1::DataQualityRule::SetExpectation
Parameter
  • value (::Google::Cloud::Dataplex::V1::DataQualityRule::SetExpectation) — Row-level rule which evaluates whether each column value is contained by a specified set.

    Note: The following fields are mutually exclusive: set_expectation, range_expectation, non_null_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::SetExpectation) — Row-level rule which evaluates whether each column value is contained by a specified set.

    Note: The following fields are mutually exclusive: set_expectation, range_expectation, non_null_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

#sql_assertion

def sql_assertion() -> ::Google::Cloud::Dataplex::V1::DataQualityRule::SqlAssertion
Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::SqlAssertion) — Aggregate rule which evaluates the number of rows returned for the provided statement. If any rows are returned, this rule fails.

    Note: The following fields are mutually exclusive: sql_assertion, range_expectation, non_null_expectation, set_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation. If a field in that set is populated, all other fields in the set will automatically be cleared.

#sql_assertion=

def sql_assertion=(value) -> ::Google::Cloud::Dataplex::V1::DataQualityRule::SqlAssertion
Parameter
  • value (::Google::Cloud::Dataplex::V1::DataQualityRule::SqlAssertion) — Aggregate rule which evaluates the number of rows returned for the provided statement. If any rows are returned, this rule fails.

    Note: The following fields are mutually exclusive: sql_assertion, range_expectation, non_null_expectation, set_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::SqlAssertion) — Aggregate rule which evaluates the number of rows returned for the provided statement. If any rows are returned, this rule fails.

    Note: The following fields are mutually exclusive: sql_assertion, range_expectation, non_null_expectation, set_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation. If a field in that set is populated, all other fields in the set will automatically be cleared.

#statistic_range_expectation

def statistic_range_expectation() -> ::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation
Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation) — Aggregate rule which evaluates whether the column aggregate statistic lies between a specified range.

    Note: The following fields are mutually exclusive: statistic_range_expectation, range_expectation, non_null_expectation, set_expectation, regex_expectation, uniqueness_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

#statistic_range_expectation=

def statistic_range_expectation=(value) -> ::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation
Parameter
  • value (::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation) — Aggregate rule which evaluates whether the column aggregate statistic lies between a specified range.

    Note: The following fields are mutually exclusive: statistic_range_expectation, range_expectation, non_null_expectation, set_expectation, regex_expectation, uniqueness_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::StatisticRangeExpectation) — Aggregate rule which evaluates whether the column aggregate statistic lies between a specified range.

    Note: The following fields are mutually exclusive: statistic_range_expectation, range_expectation, non_null_expectation, set_expectation, regex_expectation, uniqueness_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

#suspended

def suspended() -> ::Boolean
Returns
  • (::Boolean) — Optional. Whether the Rule is active or suspended. Default is false.

#suspended=

def suspended=(value) -> ::Boolean
Parameter
  • value (::Boolean) — Optional. Whether the Rule is active or suspended. Default is false.
Returns
  • (::Boolean) — Optional. Whether the Rule is active or suspended. Default is false.

#table_condition_expectation

def table_condition_expectation() -> ::Google::Cloud::Dataplex::V1::DataQualityRule::TableConditionExpectation
Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::TableConditionExpectation) — Aggregate rule which evaluates whether the provided expression is true for a table.

    Note: The following fields are mutually exclusive: table_condition_expectation, range_expectation, non_null_expectation, set_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

#table_condition_expectation=

def table_condition_expectation=(value) -> ::Google::Cloud::Dataplex::V1::DataQualityRule::TableConditionExpectation
Parameter
  • value (::Google::Cloud::Dataplex::V1::DataQualityRule::TableConditionExpectation) — Aggregate rule which evaluates whether the provided expression is true for a table.

    Note: The following fields are mutually exclusive: table_condition_expectation, range_expectation, non_null_expectation, set_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::TableConditionExpectation) — Aggregate rule which evaluates whether the provided expression is true for a table.

    Note: The following fields are mutually exclusive: table_condition_expectation, range_expectation, non_null_expectation, set_expectation, regex_expectation, uniqueness_expectation, statistic_range_expectation, row_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

#threshold

def threshold() -> ::Float
Returns
  • (::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).

    This field is only valid for row-level type rules.

#threshold=

def threshold=(value) -> ::Float
Parameter
  • value (::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).

    This field is only valid for row-level type rules.

Returns
  • (::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).

    This field is only valid for row-level type rules.

#uniqueness_expectation

def uniqueness_expectation() -> ::Google::Cloud::Dataplex::V1::DataQualityRule::UniquenessExpectation
Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::UniquenessExpectation) — Row-level rule which evaluates whether each column value is unique.

    Note: The following fields are mutually exclusive: uniqueness_expectation, range_expectation, non_null_expectation, set_expectation, regex_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

#uniqueness_expectation=

def uniqueness_expectation=(value) -> ::Google::Cloud::Dataplex::V1::DataQualityRule::UniquenessExpectation
Parameter
  • value (::Google::Cloud::Dataplex::V1::DataQualityRule::UniquenessExpectation) — Row-level rule which evaluates whether each column value is unique.

    Note: The following fields are mutually exclusive: uniqueness_expectation, range_expectation, non_null_expectation, set_expectation, regex_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Dataplex::V1::DataQualityRule::UniquenessExpectation) — Row-level rule which evaluates whether each column value is unique.

    Note: The following fields are mutually exclusive: uniqueness_expectation, range_expectation, non_null_expectation, set_expectation, regex_expectation, statistic_range_expectation, row_condition_expectation, table_condition_expectation, sql_assertion. If a field in that set is populated, all other fields in the set will automatically be cleared.