Class DataQualityRule

  • All Implemented Interfaces:
    DataQualityRuleOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class DataQualityRule
    extends com.google.protobuf.GeneratedMessageV3
    implements DataQualityRuleOrBuilder
     A rule captures data quality intent about a data source.
     
    Protobuf type google.cloud.dataplex.v1.DataQualityRule
    See Also:
    Serialized Form
    • Field Detail

      • RANGE_EXPECTATION_FIELD_NUMBER

        public static final int RANGE_EXPECTATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • NON_NULL_EXPECTATION_FIELD_NUMBER

        public static final int NON_NULL_EXPECTATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SET_EXPECTATION_FIELD_NUMBER

        public static final int SET_EXPECTATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • REGEX_EXPECTATION_FIELD_NUMBER

        public static final int REGEX_EXPECTATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • UNIQUENESS_EXPECTATION_FIELD_NUMBER

        public static final int UNIQUENESS_EXPECTATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • STATISTIC_RANGE_EXPECTATION_FIELD_NUMBER

        public static final int STATISTIC_RANGE_EXPECTATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ROW_CONDITION_EXPECTATION_FIELD_NUMBER

        public static final int ROW_CONDITION_EXPECTATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TABLE_CONDITION_EXPECTATION_FIELD_NUMBER

        public static final int TABLE_CONDITION_EXPECTATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • IGNORE_NULL_FIELD_NUMBER

        public static final int IGNORE_NULL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DESCRIPTION_FIELD_NUMBER

        public static final int DESCRIPTION_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasRangeExpectation

        public boolean hasRangeExpectation()
         Row-level rule which evaluates whether each column value lies between a
         specified range.
         
        .google.cloud.dataplex.v1.DataQualityRule.RangeExpectation range_expectation = 1;
        Specified by:
        hasRangeExpectation in interface DataQualityRuleOrBuilder
        Returns:
        Whether the rangeExpectation field is set.
      • hasNonNullExpectation

        public boolean hasNonNullExpectation()
         Row-level rule which evaluates whether each column value is null.
         
        .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2;
        Specified by:
        hasNonNullExpectation in interface DataQualityRuleOrBuilder
        Returns:
        Whether the nonNullExpectation field is set.
      • hasSetExpectation

        public boolean hasSetExpectation()
         Row-level rule which evaluates whether each column value is contained by
         a specified set.
         
        .google.cloud.dataplex.v1.DataQualityRule.SetExpectation set_expectation = 3;
        Specified by:
        hasSetExpectation in interface DataQualityRuleOrBuilder
        Returns:
        Whether the setExpectation field is set.
      • hasRegexExpectation

        public boolean hasRegexExpectation()
         Row-level rule which evaluates whether each column value matches a
         specified regex.
         
        .google.cloud.dataplex.v1.DataQualityRule.RegexExpectation regex_expectation = 4;
        Specified by:
        hasRegexExpectation in interface DataQualityRuleOrBuilder
        Returns:
        Whether the regexExpectation field is set.
      • hasUniquenessExpectation

        public boolean hasUniquenessExpectation()
         Row-level rule which evaluates whether each column value is unique.
         
        .google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation uniqueness_expectation = 100;
        Specified by:
        hasUniquenessExpectation in interface DataQualityRuleOrBuilder
        Returns:
        Whether the uniquenessExpectation field is set.
      • hasStatisticRangeExpectation

        public boolean hasStatisticRangeExpectation()
         Aggregate rule which evaluates whether the column aggregate
         statistic lies between a specified range.
         
        .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation statistic_range_expectation = 101;
        Specified by:
        hasStatisticRangeExpectation in interface DataQualityRuleOrBuilder
        Returns:
        Whether the statisticRangeExpectation field is set.
      • hasRowConditionExpectation

        public boolean hasRowConditionExpectation()
         Row-level rule which evaluates whether each row in a table passes the
         specified condition.
         
        .google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation row_condition_expectation = 200;
        Specified by:
        hasRowConditionExpectation in interface DataQualityRuleOrBuilder
        Returns:
        Whether the rowConditionExpectation field is set.
      • hasTableConditionExpectation

        public boolean hasTableConditionExpectation()
         Aggregate rule which evaluates whether the provided expression is true
         for a table.
         
        .google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation table_condition_expectation = 201;
        Specified by:
        hasTableConditionExpectation in interface DataQualityRuleOrBuilder
        Returns:
        Whether the tableConditionExpectation field is set.
      • getColumn

        public String getColumn()
         Optional. The unnested column which this rule is evaluated against.
         
        string column = 500 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getColumn in interface DataQualityRuleOrBuilder
        Returns:
        The column.
      • getColumnBytes

        public com.google.protobuf.ByteString getColumnBytes()
         Optional. The unnested column which this rule is evaluated against.
         
        string column = 500 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getColumnBytes in interface DataQualityRuleOrBuilder
        Returns:
        The bytes for column.
      • getIgnoreNull

        public boolean getIgnoreNull()
         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 row-level type rules.
         
        bool ignore_null = 501 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getIgnoreNull in interface DataQualityRuleOrBuilder
        Returns:
        The ignoreNull.
      • getDimension

        public String getDimension()
         Required. The dimension a rule belongs to. Results are also aggregated at
         the dimension level. Supported dimensions are **["COMPLETENESS",
         "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]**
         
        string dimension = 502 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getDimension in interface DataQualityRuleOrBuilder
        Returns:
        The dimension.
      • getDimensionBytes

        public com.google.protobuf.ByteString getDimensionBytes()
         Required. The dimension a rule belongs to. Results are also aggregated at
         the dimension level. Supported dimensions are **["COMPLETENESS",
         "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]**
         
        string dimension = 502 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getDimensionBytes in interface DataQualityRuleOrBuilder
        Returns:
        The bytes for dimension.
      • getThreshold

        public double getThreshold()
         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.
         
        double threshold = 503 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getThreshold in interface DataQualityRuleOrBuilder
        Returns:
        The threshold.
      • getName

        public String getName()
         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.
         
        string name = 504 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getName in interface DataQualityRuleOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         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.
         
        string name = 504 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getNameBytes in interface DataQualityRuleOrBuilder
        Returns:
        The bytes for name.
      • getDescription

        public String getDescription()
         Optional. Description of the rule.
        
         * The maximum length is 1,024 characters.
         
        string description = 505 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDescription in interface DataQualityRuleOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         Optional. Description of the rule.
        
         * The maximum length is 1,024 characters.
         
        string description = 505 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDescriptionBytes in interface DataQualityRuleOrBuilder
        Returns:
        The bytes for description.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static DataQualityRule parseFrom​(ByteBuffer data)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DataQualityRule parseFrom​(ByteBuffer data,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DataQualityRule parseFrom​(com.google.protobuf.ByteString data)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DataQualityRule parseFrom​(com.google.protobuf.ByteString data,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DataQualityRule parseFrom​(byte[] data)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DataQualityRule parseFrom​(byte[] data,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DataQualityRule parseFrom​(com.google.protobuf.CodedInputStream input,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws IOException
        Throws:
        IOException
      • newBuilderForType

        public DataQualityRule.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public DataQualityRule.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected DataQualityRule.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • parser

        public static com.google.protobuf.Parser<DataQualityRule> parser()
      • getParserForType

        public com.google.protobuf.Parser<DataQualityRule> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public DataQualityRule getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder