# Google Cloud Dataplex V1 Client - Class DataQualityRuleResult (1.14.0)

1.14.0 (latest) 1.13.0 1.12.0 1.11.0 1.10.0 1.9.1 1.8.0 1.7.1 1.6.1 1.4.0 1.3.0 1.2.1 1.1.1 1.0.1 0.16.1 0.15.1 0.14.0 0.13.0 0.12.0 0.11.1 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.1 0.4.0 0.3.0 0.2.3 0.1.6 Reference documentation and code samples for the Google Cloud Dataplex V1 Client class DataQualityRuleResult.

DataQualityRuleResult provides a more detailed, per-rule view of the results.

Generated from protobuf message `google.cloud.dataplex.v1.DataQualityRuleResult`

## Namespace

Google \\ Cloud \\ Dataplex \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ rule` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.DataQualityRule` Output only. The rule specified in the DataQualitySpec, as is. |
| `↳ passed` | `bool` Output only. Whether the rule passed or failed. |
| `↳ evaluated_count` | `int|string` Output only. The number of rows a rule was evaluated against. This field is only valid for row-level type rules. Evaluated count can be configured to either \* \* include all rows (default) - with `null` rows automatically failing rule evaluation, or \* \* exclude `null` rows from the `evaluated_count`, by setting `ignore_nulls = true`. This field is not set for rule SqlAssertion. |
| `↳ passed_count` | `int|string` Output only. The number of rows which passed a rule evaluation. This field is only valid for row-level type rules. This field is not set for rule SqlAssertion. |
| `↳ null_count` | `int|string` Output only. The number of rows with null values in the specified column. |
| `↳ pass_ratio` | `float` Output only. The ratio of **passed_count / evaluated_count**. This field is only valid for row-level type rules. |
| `↳ failing_rows_query` | `string` Output only. The query to find rows that did not pass this rule. This field is only valid for row-level type rules. |
| `↳ assertion_row_count` | `int|string` Output only. The number of rows returned by the SQL statement in a SQL assertion rule. This field is only valid for SQL assertion rules. |
| `↳ debug_queries_result_sets` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.DataQualityRuleResult.DebugQueryResultSet>` Output only. Contains the results of all debug queries for this rule. The number of result sets will correspond to the number of [debug_queries](https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.DataQualityRule#_Google_Cloud_Dataplex_V1_DataQualityRule__getDebugQueries__). |

### getRule

Output only. The rule specified in the DataQualitySpec, as is.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.DataQualityRule|null` |   |

### hasRule

### clearRule

### setRule

Output only. The rule specified in the DataQualitySpec, as is.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.DataQualityRule` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPassed

Output only. Whether the rule passed or failed.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setPassed

Output only. Whether the rule passed or failed.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getEvaluatedCount

Output only. The number of rows a rule was evaluated against.

This field is only valid for row-level type rules.
Evaluated count can be configured to either

- include all rows (default) - with `null` rows automatically failing rule evaluation, or
- exclude `null` rows from the `evaluated_count`, by setting `ignore_nulls = true`. This field is not set for rule SqlAssertion.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### setEvaluatedCount

Output only. The number of rows a rule was evaluated against.

This field is only valid for row-level type rules.
Evaluated count can be configured to either

- include all rows (default) - with `null` rows automatically failing rule evaluation, or
- exclude `null` rows from the `evaluated_count`, by setting `ignore_nulls = true`. This field is not set for rule SqlAssertion.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPassedCount

Output only. The number of rows which passed a rule evaluation.

This field is only valid for row-level type rules.
This field is not set for rule SqlAssertion.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### setPassedCount

Output only. The number of rows which passed a rule evaluation.

This field is only valid for row-level type rules.
This field is not set for rule SqlAssertion.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getNullCount

Output only. The number of rows with null values in the specified column.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### setNullCount

Output only. The number of rows with null values in the specified column.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPassRatio

Output only. The ratio of **passed_count / evaluated_count**.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setPassRatio

Output only. The ratio of **passed_count / evaluated_count**.

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getFailingRowsQuery

Output only. The query to find rows that did not pass this rule.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setFailingRowsQuery

Output only. The query to find rows that did not pass this rule.

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAssertionRowCount

Output only. The number of rows returned by the SQL statement in a SQL
assertion rule.

This field is only valid for SQL assertion rules.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### setAssertionRowCount

Output only. The number of rows returned by the SQL statement in a SQL
assertion rule.

This field is only valid for SQL assertion rules.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDebugQueriesResultSets

Output only. Contains the results of all debug queries for this rule.

The number of result sets will correspond to the number of
[debug_queries](https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.DataQualityRule#_Google_Cloud_Dataplex_V1_DataQualityRule__getDebugQueries__).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.DataQualityRuleResult.DebugQueryResultSet>` |   |

### setDebugQueriesResultSets

Output only. Contains the results of all debug queries for this rule.

The number of result sets will correspond to the number of
[debug_queries](https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.DataQualityRule#_Google_Cloud_Dataplex_V1_DataQualityRule__getDebugQueries__).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dataplex/latest/V1.DataQualityRuleResult.DebugQueryResultSet>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |