Reference documentation and code samples for the Google Cloud Dataplex V1 Client class DataQualityRule.
A rule captures data quality intent about a data source.
Generated from protobuf message google.cloud.dataplex.v1.DataQualityRule
Namespace
Google \ Cloud \ Dataplex \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ range_expectation
DataQualityRule\RangeExpectation
Row-level rule which evaluates whether each column value lies between a specified range.
↳ non_null_expectation
DataQualityRule\NonNullExpectation
Row-level rule which evaluates whether each column value is null.
↳ set_expectation
DataQualityRule\SetExpectation
Row-level rule which evaluates whether each column value is contained by a specified set.
↳ regex_expectation
DataQualityRule\RegexExpectation
Row-level rule which evaluates whether each column value matches a specified regex.
↳ uniqueness_expectation
DataQualityRule\UniquenessExpectation
Row-level rule which evaluates whether each column value is unique.
↳ statistic_range_expectation
DataQualityRule\StatisticRangeExpectation
Aggregate rule which evaluates whether the column aggregate statistic lies between a specified range.
↳ row_condition_expectation
DataQualityRule\RowConditionExpectation
Row-level rule which evaluates whether each row in a table passes the specified condition.
↳ table_condition_expectation
DataQualityRule\TableConditionExpectation
Aggregate rule which evaluates whether the provided expression is true for a table.
↳ sql_assertion
DataQualityRule\SqlAssertion
Aggregate rule which evaluates the number of rows returned for the provided statement. If any rows are returned, this rule fails.
↳ column
string
Optional. The unnested column which this rule is evaluated against.
↳ ignore_null
bool
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
↳ dimension
string
Required. The dimension a rule belongs to. Results are also aggregated at the dimension level. Supported dimensions are ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "FRESHNESS", "VOLUME"]
↳ threshold
float
Optional. The minimum ratio of passing_rows / total_rowsrequired 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.
↳ name
string
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.
↳ description
string
Optional. Description of the rule. * * The maximum length is 1,024 characters.
↳ suspended
bool
Optional. Whether the Rule is active or suspended. Default is false.
getRangeExpectation
Row-level rule which evaluates whether each column value lies between a specified range.
hasRangeExpectation
setRangeExpectation
Row-level rule which evaluates whether each column value lies between a specified range.
$this
getNonNullExpectation
Row-level rule which evaluates whether each column value is null.
hasNonNullExpectation
setNonNullExpectation
Row-level rule which evaluates whether each column value is null.
$this
getSetExpectation
Row-level rule which evaluates whether each column value is contained by a specified set.
hasSetExpectation
setSetExpectation
Row-level rule which evaluates whether each column value is contained by a specified set.
$this
getRegexExpectation
Row-level rule which evaluates whether each column value matches a specified regex.
hasRegexExpectation
setRegexExpectation
Row-level rule which evaluates whether each column value matches a specified regex.
$this
getUniquenessExpectation
Row-level rule which evaluates whether each column value is unique.
hasUniquenessExpectation
setUniquenessExpectation
Row-level rule which evaluates whether each column value is unique.
$this
getStatisticRangeExpectation
Aggregate rule which evaluates whether the column aggregate statistic lies between a specified range.
hasStatisticRangeExpectation
setStatisticRangeExpectation
Aggregate rule which evaluates whether the column aggregate statistic lies between a specified range.
$this
getRowConditionExpectation
Row-level rule which evaluates whether each row in a table passes the specified condition.
hasRowConditionExpectation
setRowConditionExpectation
Row-level rule which evaluates whether each row in a table passes the specified condition.
$this
getTableConditionExpectation
Aggregate rule which evaluates whether the provided expression is true for a table.
hasTableConditionExpectation
setTableConditionExpectation
Aggregate rule which evaluates whether the provided expression is true for a table.
$this
getSqlAssertion
Aggregate rule which evaluates the number of rows returned for the provided statement. If any rows are returned, this rule fails.
hasSqlAssertion
setSqlAssertion
Aggregate rule which evaluates the number of rows returned for the provided statement. If any rows are returned, this rule fails.
$this
getColumn
Optional. The unnested column which this rule is evaluated against.
string
setColumn
Optional. The unnested column which this rule is evaluated against.
var
string
$this
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
setIgnoreNull
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
var
bool
$this
getDimension
Required. The dimension a rule belongs to. Results are also aggregated at the dimension level. Supported dimensions are ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "FRESHNESS", "VOLUME"]
string
setDimension
Required. The dimension a rule belongs to. Results are also aggregated at the dimension level. Supported dimensions are ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "FRESHNESS", "VOLUME"]
var
string
$this
getThreshold
Optional. The minimum ratio of passing_rows / total_rowsrequired 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.
float
setThreshold
Optional. The minimum ratio of passing_rows / total_rowsrequired 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.
var
float
$this
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
setName
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.
var
string
$this
getDescription
Optional. Description of the rule.
- The maximum length is 1,024 characters.
string
setDescription
Optional. Description of the rule.
- The maximum length is 1,024 characters.
var
string
$this
getSuspended
Optional. Whether the Rule is active or suspended.
Default is false.
bool
setSuspended
Optional. Whether the Rule is active or suspended.
Default is false.
var
bool
$this
getRuleType
string