Class DataQualityRule (1.38.0)

public final class DataQualityRule extends GeneratedMessageV3 implements DataQualityRuleOrBuilder

A rule captures data quality intent about a data source.

Protobuf type google.cloud.dataplex.v1.DataQualityRule

Static Fields

COLUMN_FIELD_NUMBER

public static final int COLUMN_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

DIMENSION_FIELD_NUMBER

public static final int DIMENSION_FIELD_NUMBER
Field Value
TypeDescription
int

IGNORE_NULL_FIELD_NUMBER

public static final int IGNORE_NULL_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

NON_NULL_EXPECTATION_FIELD_NUMBER

public static final int NON_NULL_EXPECTATION_FIELD_NUMBER
Field Value
TypeDescription
int

RANGE_EXPECTATION_FIELD_NUMBER

public static final int RANGE_EXPECTATION_FIELD_NUMBER
Field Value
TypeDescription
int

REGEX_EXPECTATION_FIELD_NUMBER

public static final int REGEX_EXPECTATION_FIELD_NUMBER
Field Value
TypeDescription
int

ROW_CONDITION_EXPECTATION_FIELD_NUMBER

public static final int ROW_CONDITION_EXPECTATION_FIELD_NUMBER
Field Value
TypeDescription
int

SET_EXPECTATION_FIELD_NUMBER

public static final int SET_EXPECTATION_FIELD_NUMBER
Field Value
TypeDescription
int

STATISTIC_RANGE_EXPECTATION_FIELD_NUMBER

public static final int STATISTIC_RANGE_EXPECTATION_FIELD_NUMBER
Field Value
TypeDescription
int

TABLE_CONDITION_EXPECTATION_FIELD_NUMBER

public static final int TABLE_CONDITION_EXPECTATION_FIELD_NUMBER
Field Value
TypeDescription
int

THRESHOLD_FIELD_NUMBER

public static final int THRESHOLD_FIELD_NUMBER
Field Value
TypeDescription
int

UNIQUENESS_EXPECTATION_FIELD_NUMBER

public static final int UNIQUENESS_EXPECTATION_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static DataQualityRule getDefaultInstance()
Returns
TypeDescription
DataQualityRule

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static DataQualityRule.Builder newBuilder()
Returns
TypeDescription
DataQualityRule.Builder

newBuilder(DataQualityRule prototype)

public static DataQualityRule.Builder newBuilder(DataQualityRule prototype)
Parameter
NameDescription
prototypeDataQualityRule
Returns
TypeDescription
DataQualityRule.Builder

parseDelimitedFrom(InputStream input)

public static DataQualityRule parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DataQualityRule
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DataQualityRule parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DataQualityRule
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static DataQualityRule parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
DataQualityRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static DataQualityRule parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DataQualityRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static DataQualityRule parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
DataQualityRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static DataQualityRule parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DataQualityRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static DataQualityRule parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
DataQualityRule
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static DataQualityRule parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DataQualityRule
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static DataQualityRule parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DataQualityRule
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DataQualityRule parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DataQualityRule
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static DataQualityRule parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
DataQualityRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static DataQualityRule parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DataQualityRule
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<DataQualityRule> parser()
Returns
TypeDescription
Parser<DataQualityRule>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getColumn()

public String getColumn()

Optional. The unnested column which this rule is evaluated against.

string column = 500 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The column.

getColumnBytes()

public ByteString getColumnBytes()

Optional. The unnested column which this rule is evaluated against.

string column = 500 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for column.

getDefaultInstanceForType()

public DataQualityRule getDefaultInstanceForType()
Returns
TypeDescription
DataQualityRule

getDescription()

public String getDescription()

Optional. Description of the rule.

  • The maximum length is 1,024 characters.

string description = 505 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. Description of the rule.

  • The maximum length is 1,024 characters.

string description = 505 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for description.

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];

Returns
TypeDescription
String

The dimension.

getDimensionBytes()

public 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];

Returns
TypeDescription
ByteString

The bytes for dimension.

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 the following type of rules:

  • RangeExpectation
  • RegexExpectation
  • SetExpectation
  • UniquenessExpectation

bool ignore_null = 501 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

The ignoreNull.

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];

Returns
TypeDescription
String

The name.

getNameBytes()

public 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];

Returns
TypeDescription
ByteString

The bytes for name.

getNonNullExpectation()

public DataQualityRule.NonNullExpectation getNonNullExpectation()

Row-level rule which evaluates whether each column value is null.

.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2;

Returns
TypeDescription
DataQualityRule.NonNullExpectation

The nonNullExpectation.

getNonNullExpectationOrBuilder()

public DataQualityRule.NonNullExpectationOrBuilder getNonNullExpectationOrBuilder()

Row-level rule which evaluates whether each column value is null.

.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2;

Returns
TypeDescription
DataQualityRule.NonNullExpectationOrBuilder

getParserForType()

public Parser<DataQualityRule> getParserForType()
Returns
TypeDescription
Parser<DataQualityRule>
Overrides

getRangeExpectation()

public DataQualityRule.RangeExpectation getRangeExpectation()

Row-level rule which evaluates whether each column value lies between a specified range.

.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation range_expectation = 1;

Returns
TypeDescription
DataQualityRule.RangeExpectation

The rangeExpectation.

getRangeExpectationOrBuilder()

public DataQualityRule.RangeExpectationOrBuilder getRangeExpectationOrBuilder()

Row-level rule which evaluates whether each column value lies between a specified range.

.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation range_expectation = 1;

Returns
TypeDescription
DataQualityRule.RangeExpectationOrBuilder

getRegexExpectation()

public DataQualityRule.RegexExpectation getRegexExpectation()

Row-level rule which evaluates whether each column value matches a specified regex.

.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation regex_expectation = 4;

Returns
TypeDescription
DataQualityRule.RegexExpectation

The regexExpectation.

getRegexExpectationOrBuilder()

public DataQualityRule.RegexExpectationOrBuilder getRegexExpectationOrBuilder()

Row-level rule which evaluates whether each column value matches a specified regex.

.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation regex_expectation = 4;

Returns
TypeDescription
DataQualityRule.RegexExpectationOrBuilder

getRowConditionExpectation()

public DataQualityRule.RowConditionExpectation getRowConditionExpectation()

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;

Returns
TypeDescription
DataQualityRule.RowConditionExpectation

The rowConditionExpectation.

getRowConditionExpectationOrBuilder()

public DataQualityRule.RowConditionExpectationOrBuilder getRowConditionExpectationOrBuilder()

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;

Returns
TypeDescription
DataQualityRule.RowConditionExpectationOrBuilder

getRuleTypeCase()

public DataQualityRule.RuleTypeCase getRuleTypeCase()
Returns
TypeDescription
DataQualityRule.RuleTypeCase

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSetExpectation()

public DataQualityRule.SetExpectation getSetExpectation()

Row-level rule which evaluates whether each column value is contained by a specified set.

.google.cloud.dataplex.v1.DataQualityRule.SetExpectation set_expectation = 3;

Returns
TypeDescription
DataQualityRule.SetExpectation

The setExpectation.

getSetExpectationOrBuilder()

public DataQualityRule.SetExpectationOrBuilder getSetExpectationOrBuilder()

Row-level rule which evaluates whether each column value is contained by a specified set.

.google.cloud.dataplex.v1.DataQualityRule.SetExpectation set_expectation = 3;

Returns
TypeDescription
DataQualityRule.SetExpectationOrBuilder

getStatisticRangeExpectation()

public DataQualityRule.StatisticRangeExpectation getStatisticRangeExpectation()

Aggregate rule which evaluates whether the column aggregate statistic lies between a specified range.

.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation statistic_range_expectation = 101;

Returns
TypeDescription
DataQualityRule.StatisticRangeExpectation

The statisticRangeExpectation.

getStatisticRangeExpectationOrBuilder()

public DataQualityRule.StatisticRangeExpectationOrBuilder getStatisticRangeExpectationOrBuilder()

Aggregate rule which evaluates whether the column aggregate statistic lies between a specified range.

.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation statistic_range_expectation = 101;

Returns
TypeDescription
DataQualityRule.StatisticRangeExpectationOrBuilder

getTableConditionExpectation()

public DataQualityRule.TableConditionExpectation getTableConditionExpectation()

Aggregate rule which evaluates whether the provided expression is true for a table.

.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation table_condition_expectation = 201;

Returns
TypeDescription
DataQualityRule.TableConditionExpectation

The tableConditionExpectation.

getTableConditionExpectationOrBuilder()

public DataQualityRule.TableConditionExpectationOrBuilder getTableConditionExpectationOrBuilder()

Aggregate rule which evaluates whether the provided expression is true for a table.

.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation table_condition_expectation = 201;

Returns
TypeDescription
DataQualityRule.TableConditionExpectationOrBuilder

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];

Returns
TypeDescription
double

The threshold.

getUniquenessExpectation()

public DataQualityRule.UniquenessExpectation getUniquenessExpectation()

Row-level rule which evaluates whether each column value is unique.

.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation uniqueness_expectation = 100;

Returns
TypeDescription
DataQualityRule.UniquenessExpectation

The uniquenessExpectation.

getUniquenessExpectationOrBuilder()

public DataQualityRule.UniquenessExpectationOrBuilder getUniquenessExpectationOrBuilder()

Row-level rule which evaluates whether each column value is unique.

.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation uniqueness_expectation = 100;

Returns
TypeDescription
DataQualityRule.UniquenessExpectationOrBuilder

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;

Returns
TypeDescription
boolean

Whether the nonNullExpectation field is set.

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;

Returns
TypeDescription
boolean

Whether the rangeExpectation 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;

Returns
TypeDescription
boolean

Whether the regexExpectation 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;

Returns
TypeDescription
boolean

Whether the rowConditionExpectation 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;

Returns
TypeDescription
boolean

Whether the setExpectation 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;

Returns
TypeDescription
boolean

Whether the statisticRangeExpectation 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;

Returns
TypeDescription
boolean

Whether the tableConditionExpectation 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;

Returns
TypeDescription
boolean

Whether the uniquenessExpectation field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public DataQualityRule.Builder newBuilderForType()
Returns
TypeDescription
DataQualityRule.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected DataQualityRule.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
DataQualityRule.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public DataQualityRule.Builder toBuilder()
Returns
TypeDescription
DataQualityRule.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException