3.16.0 (latest) 3.15.0 3.14.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.0.0

    public sealed class DataQualityRule : IMessage<DataQualityRule>, IEquatable<DataQualityRule>, IDeepCloneable<DataQualityRule>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Dataplex v1 API class DataQualityRule.

A rule captures data quality intent about a data source.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> DataQualityRule

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[DataQualityRule](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataplex.V1/latest/Google.Cloud.Dataplex.V1.DataQualityRule.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[DataQualityRule](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataplex.V1/latest/Google.Cloud.Dataplex.V1.DataQualityRule.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[DataQualityRule](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataplex.V1/latest/Google.Cloud.Dataplex.V1.DataQualityRule.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Dataplex.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dataplex.V1/latest/Google.Cloud.Dataplex.V1.md.txt)

## Assembly

Google.Cloud.Dataplex.V1.dll

## Constructors

### DataQualityRule()

    public DataQualityRule()

### DataQualityRule(DataQualityRule)

    public DataQualityRule(DataQualityRule other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `DataQualityRule` |

## Properties

### Attributes

    public MapField<string, string> Attributes { get; }

Optional. Map of attribute name and value linked to the rule. The rules to
evaluate can be filtered based on attributes provided here and a filter
expression provided in the DataQualitySpec.filter field.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `MapFieldstringstring` |   |

### Column

    public string Column { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### DebugQueries

    public RepeatedField<DataQualityRule.Types.DebugQuery> DebugQueries { get; }

Optional. Specifies the debug queries for this rule.
Currently, only one query is supported, but this may be expanded in the
future.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldDataQualityRuleTypesDebugQuery` |   |

### Description

    public string Description { get; set; }

Optional. Description of the rule.

- The maximum length is 1,024 characters.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### Dimension

    public string Dimension { get; set; }

Optional. The dimension a rule belongs to. Results are also aggregated at
the dimension level. Custom dimension name is supported with all uppercase
letters and maximum length of 30 characters.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### IgnoreNull

    public bool IgnoreNull { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### Name

    public string Name { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### NonNullExpectation

    public DataQualityRule.Types.NonNullExpectation NonNullExpectation { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `DataQualityRuleTypesNonNullExpectation` |   |

### RangeExpectation

    public DataQualityRule.Types.RangeExpectation RangeExpectation { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `DataQualityRuleTypesRangeExpectation` |   |

### RegexExpectation

    public DataQualityRule.Types.RegexExpectation RegexExpectation { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `DataQualityRuleTypesRegexExpectation` |   |

### RowConditionExpectation

    public DataQualityRule.Types.RowConditionExpectation RowConditionExpectation { get; set; }

Row-level rule which evaluates whether each row in a table passes the
specified condition.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `DataQualityRuleTypesRowConditionExpectation` |   |

### RuleSource

    public DataQualityRule.Types.RuleSource RuleSource { get; set; }

Output only. Contains information about the source of the rule and its
relationship with the BigQuery table, where applicable.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `DataQualityRuleTypesRuleSource` |   |

### RuleTypeCase

    public DataQualityRule.RuleTypeOneofCase RuleTypeCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `DataQualityRuleRuleTypeOneofCase` |   |

### SetExpectation

    public DataQualityRule.Types.SetExpectation SetExpectation { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `DataQualityRuleTypesSetExpectation` |   |

### SqlAssertion

    public DataQualityRule.Types.SqlAssertion SqlAssertion { get; set; }

Aggregate rule which evaluates the number of rows returned for the
provided statement. If any rows are returned, this rule fails.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `DataQualityRuleTypesSqlAssertion` |   |

### StatisticRangeExpectation

    public DataQualityRule.Types.StatisticRangeExpectation StatisticRangeExpectation { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `DataQualityRuleTypesStatisticRangeExpectation` |   |

### Suspended

    public bool Suspended { get; set; }

Optional. Whether the Rule is active or suspended.
Default is false.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### TableConditionExpectation

    public DataQualityRule.Types.TableConditionExpectation TableConditionExpectation { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `DataQualityRuleTypesTableConditionExpectation` |   |

### TemplateReference

    public DataQualityRule.Types.TemplateReference TemplateReference { get; set; }

Aggregate rule which references a rule template and provides the
parameters to be substituted in the template. If any rows are returned,
this rule fails.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `DataQualityRuleTypesTemplateReference` |   |

### Threshold

    public double Threshold { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `double` |   |

### UniquenessExpectation

    public DataQualityRule.Types.UniquenessExpectation UniquenessExpectation { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `DataQualityRuleTypesUniquenessExpectation` |   |