# Interface DataQualityRuleOrBuilder (0.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.16.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRuleOrBuilder)
- [0.15.0](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.dataplex.v1.DataQualityRuleOrBuilder)
- [0.14.1](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.dataplex.v1.DataQualityRuleOrBuilder)

    public interface DataQualityRuleOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getColumn()

    public abstract String getColumn()

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

`string column = 500;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The column. |

### getColumnBytes()

    public abstract ByteString getColumnBytes()

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

`string column = 500;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for column. |

### getDimension()

    public abstract 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The dimension. |

### getDimensionBytes()

    public abstract 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;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for dimension. |

### getIgnoreNull()

    public abstract 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.
Only applicable to ColumnMap rules.

`bool ignore_null = 501;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The ignoreNull. |

### getNonNullExpectation()

    public abstract DataQualityRule.NonNullExpectation getNonNullExpectation()

ColumnMap rule which evaluates whether each column value is null.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.NonNullExpectation` | The nonNullExpectation. |

### getNonNullExpectationOrBuilder()

    public abstract DataQualityRule.NonNullExpectationOrBuilder getNonNullExpectationOrBuilder()

ColumnMap rule which evaluates whether each column value is null.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.NonNullExpectationOrBuilder` |   |

### getRangeExpectation()

    public abstract DataQualityRule.RangeExpectation getRangeExpectation()

ColumnMap rule which evaluates whether each column value lies between a
specified range.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.RangeExpectation` | The rangeExpectation. |

### getRangeExpectationOrBuilder()

    public abstract DataQualityRule.RangeExpectationOrBuilder getRangeExpectationOrBuilder()

ColumnMap rule which evaluates whether each column value lies between a
specified range.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.RangeExpectationOrBuilder` |   |

### getRegexExpectation()

    public abstract DataQualityRule.RegexExpectation getRegexExpectation()

ColumnMap rule which evaluates whether each column value matches a
specified regex.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.RegexExpectation` | The regexExpectation. |

### getRegexExpectationOrBuilder()

    public abstract DataQualityRule.RegexExpectationOrBuilder getRegexExpectationOrBuilder()

ColumnMap rule which evaluates whether each column value matches a
specified regex.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.RegexExpectationOrBuilder` |   |

### getRowConditionExpectation()

    public abstract DataQualityRule.RowConditionExpectation getRowConditionExpectation()

Table rule which evaluates whether each row passes the specified
condition.

`
.google.events.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation row_condition_expectation = 200;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation` | The rowConditionExpectation. |

### getRowConditionExpectationOrBuilder()

    public abstract DataQualityRule.RowConditionExpectationOrBuilder getRowConditionExpectationOrBuilder()

Table rule which evaluates whether each row passes the specified
condition.

`
.google.events.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation row_condition_expectation = 200;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.RowConditionExpectationOrBuilder` |   |

### getRuleTypeCase()

    public abstract DataQualityRule.RuleTypeCase getRuleTypeCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.RuleTypeCase` |   |

### getSetExpectation()

    public abstract DataQualityRule.SetExpectation getSetExpectation()

ColumnMap rule which evaluates whether each column value is contained by
a specified set.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.SetExpectation` | The setExpectation. |

### getSetExpectationOrBuilder()

    public abstract DataQualityRule.SetExpectationOrBuilder getSetExpectationOrBuilder()

ColumnMap rule which evaluates whether each column value is contained by
a specified set.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.SetExpectationOrBuilder` |   |

### getStatisticRangeExpectation()

    public abstract DataQualityRule.StatisticRangeExpectation getStatisticRangeExpectation()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation` | The statisticRangeExpectation. |

### getStatisticRangeExpectationOrBuilder()

    public abstract DataQualityRule.StatisticRangeExpectationOrBuilder getStatisticRangeExpectationOrBuilder()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectationOrBuilder` |   |

### getTableConditionExpectation()

    public abstract DataQualityRule.TableConditionExpectation getTableConditionExpectation()

Table rule which evaluates whether the provided expression is true.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation` | The tableConditionExpectation. |

### getTableConditionExpectationOrBuilder()

    public abstract DataQualityRule.TableConditionExpectationOrBuilder getTableConditionExpectationOrBuilder()

Table rule which evaluates whether the provided expression is true.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.TableConditionExpectationOrBuilder` |   |

### getThreshold()

    public abstract 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).

`double threshold = 503;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The threshold. |

### getUniquenessExpectation()

    public abstract DataQualityRule.UniquenessExpectation getUniquenessExpectation()

ColumnAggregate rule which evaluates whether the column has duplicates.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation` | The uniquenessExpectation. |

### getUniquenessExpectationOrBuilder()

    public abstract DataQualityRule.UniquenessExpectationOrBuilder getUniquenessExpectationOrBuilder()

ColumnAggregate rule which evaluates whether the column has duplicates.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.dataplex.v1.DataQualityRule.UniquenessExpectationOrBuilder` |   |

### hasNonNullExpectation()

    public abstract boolean hasNonNullExpectation()

ColumnMap rule which evaluates whether each column value is null.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the nonNullExpectation field is set. |

### hasRangeExpectation()

    public abstract boolean hasRangeExpectation()

ColumnMap rule which evaluates whether each column value lies between a
specified range.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the rangeExpectation field is set. |

### hasRegexExpectation()

    public abstract boolean hasRegexExpectation()

ColumnMap rule which evaluates whether each column value matches a
specified regex.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the regexExpectation field is set. |

### hasRowConditionExpectation()

    public abstract boolean hasRowConditionExpectation()

Table rule which evaluates whether each row passes the specified
condition.

`
.google.events.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation row_condition_expectation = 200;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the rowConditionExpectation field is set. |

### hasSetExpectation()

    public abstract boolean hasSetExpectation()

ColumnMap rule which evaluates whether each column value is contained by
a specified set.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the setExpectation field is set. |

### hasStatisticRangeExpectation()

    public abstract boolean hasStatisticRangeExpectation()

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the statisticRangeExpectation field is set. |

### hasTableConditionExpectation()

    public abstract boolean hasTableConditionExpectation()

Table rule which evaluates whether the provided expression is true.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the tableConditionExpectation field is set. |

### hasUniquenessExpectation()

    public abstract boolean hasUniquenessExpectation()

ColumnAggregate rule which evaluates whether the column has duplicates.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the uniquenessExpectation field is set. |