@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Rule extends Object implements Serializable, Cloneable, StructuredPojo
Represents a single data quality requirement that should be validated in the scope of this dataset.
Constructor and Description |
---|
Rule() |
Modifier and Type | Method and Description |
---|---|
Rule |
addSubstitutionMapEntry(String key,
String value)
Add a single SubstitutionMap entry
|
Rule |
clearSubstitutionMapEntries()
Removes all the entries added into SubstitutionMap.
|
Rule |
clone() |
boolean |
equals(Object obj) |
String |
getCheckExpression()
The expression which includes column references, condition names followed by variable references, possibly
grouped and combined with other conditions.
|
List<ColumnSelector> |
getColumnSelectors()
List of column selectors.
|
Boolean |
getDisabled()
A value that specifies whether the rule is disabled.
|
String |
getName()
The name of the rule.
|
Map<String,String> |
getSubstitutionMap()
The map of substitution variable names to their values used in a check expression.
|
Threshold |
getThreshold()
The threshold used with a non-aggregate check expression.
|
int |
hashCode() |
Boolean |
isDisabled()
A value that specifies whether the rule is disabled.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setCheckExpression(String checkExpression)
The expression which includes column references, condition names followed by variable references, possibly
grouped and combined with other conditions.
|
void |
setColumnSelectors(Collection<ColumnSelector> columnSelectors)
List of column selectors.
|
void |
setDisabled(Boolean disabled)
A value that specifies whether the rule is disabled.
|
void |
setName(String name)
The name of the rule.
|
void |
setSubstitutionMap(Map<String,String> substitutionMap)
The map of substitution variable names to their values used in a check expression.
|
void |
setThreshold(Threshold threshold)
The threshold used with a non-aggregate check expression.
|
String |
toString()
Returns a string representation of this object.
|
Rule |
withCheckExpression(String checkExpression)
The expression which includes column references, condition names followed by variable references, possibly
grouped and combined with other conditions.
|
Rule |
withColumnSelectors(Collection<ColumnSelector> columnSelectors)
List of column selectors.
|
Rule |
withColumnSelectors(ColumnSelector... columnSelectors)
List of column selectors.
|
Rule |
withDisabled(Boolean disabled)
A value that specifies whether the rule is disabled.
|
Rule |
withName(String name)
The name of the rule.
|
Rule |
withSubstitutionMap(Map<String,String> substitutionMap)
The map of substitution variable names to their values used in a check expression.
|
Rule |
withThreshold(Threshold threshold)
The threshold used with a non-aggregate check expression.
|
public void setName(String name)
The name of the rule.
name
- The name of the rule.public String getName()
The name of the rule.
public Rule withName(String name)
The name of the rule.
name
- The name of the rule.public void setDisabled(Boolean disabled)
A value that specifies whether the rule is disabled. Once a rule is disabled, a profile job will not validate it during a job run. Default value is false.
disabled
- A value that specifies whether the rule is disabled. Once a rule is disabled, a profile job will not
validate it during a job run. Default value is false.public Boolean getDisabled()
A value that specifies whether the rule is disabled. Once a rule is disabled, a profile job will not validate it during a job run. Default value is false.
public Rule withDisabled(Boolean disabled)
A value that specifies whether the rule is disabled. Once a rule is disabled, a profile job will not validate it during a job run. Default value is false.
disabled
- A value that specifies whether the rule is disabled. Once a rule is disabled, a profile job will not
validate it during a job run. Default value is false.public Boolean isDisabled()
A value that specifies whether the rule is disabled. Once a rule is disabled, a profile job will not validate it during a job run. Default value is false.
public void setCheckExpression(String checkExpression)
The expression which includes column references, condition names followed by variable references, possibly
grouped and combined with other conditions. For example,
(:col1 starts_with :prefix1 or :col1 starts_with :prefix2) and (:col1 ends_with :suffix1 or :col1 ends_with :suffix2)
. Column and value references are substitution variables that should start with the ':' symbol. Depending on the
context, substitution variables' values can be either an actual value or a column name. These values are defined
in the SubstitutionMap. If a CheckExpression starts with a column reference, then ColumnSelectors in the rule
should be null. If ColumnSelectors has been defined, then there should be no column reference in the left side of
a condition, for example, is_between :val1 and :val2
.
For more information, see Available checks
checkExpression
- The expression which includes column references, condition names followed by variable references, possibly
grouped and combined with other conditions. For example,
(:col1 starts_with :prefix1 or :col1 starts_with :prefix2) and (:col1 ends_with :suffix1 or :col1 ends_with :suffix2)
. Column and value references are substitution variables that should start with the ':' symbol. Depending
on the context, substitution variables' values can be either an actual value or a column name. These
values are defined in the SubstitutionMap. If a CheckExpression starts with a column reference, then
ColumnSelectors in the rule should be null. If ColumnSelectors has been defined, then there should be no
column reference in the left side of a condition, for example, is_between :val1 and :val2
.
For more information, see Available checks
public String getCheckExpression()
The expression which includes column references, condition names followed by variable references, possibly
grouped and combined with other conditions. For example,
(:col1 starts_with :prefix1 or :col1 starts_with :prefix2) and (:col1 ends_with :suffix1 or :col1 ends_with :suffix2)
. Column and value references are substitution variables that should start with the ':' symbol. Depending on the
context, substitution variables' values can be either an actual value or a column name. These values are defined
in the SubstitutionMap. If a CheckExpression starts with a column reference, then ColumnSelectors in the rule
should be null. If ColumnSelectors has been defined, then there should be no column reference in the left side of
a condition, for example, is_between :val1 and :val2
.
For more information, see Available checks
(:col1 starts_with :prefix1 or :col1 starts_with :prefix2) and (:col1 ends_with :suffix1 or :col1 ends_with :suffix2)
. Column and value references are substitution variables that should start with the ':' symbol. Depending
on the context, substitution variables' values can be either an actual value or a column name. These
values are defined in the SubstitutionMap. If a CheckExpression starts with a column reference, then
ColumnSelectors in the rule should be null. If ColumnSelectors has been defined, then there should be no
column reference in the left side of a condition, for example, is_between :val1 and :val2
.
For more information, see Available checks
public Rule withCheckExpression(String checkExpression)
The expression which includes column references, condition names followed by variable references, possibly
grouped and combined with other conditions. For example,
(:col1 starts_with :prefix1 or :col1 starts_with :prefix2) and (:col1 ends_with :suffix1 or :col1 ends_with :suffix2)
. Column and value references are substitution variables that should start with the ':' symbol. Depending on the
context, substitution variables' values can be either an actual value or a column name. These values are defined
in the SubstitutionMap. If a CheckExpression starts with a column reference, then ColumnSelectors in the rule
should be null. If ColumnSelectors has been defined, then there should be no column reference in the left side of
a condition, for example, is_between :val1 and :val2
.
For more information, see Available checks
checkExpression
- The expression which includes column references, condition names followed by variable references, possibly
grouped and combined with other conditions. For example,
(:col1 starts_with :prefix1 or :col1 starts_with :prefix2) and (:col1 ends_with :suffix1 or :col1 ends_with :suffix2)
. Column and value references are substitution variables that should start with the ':' symbol. Depending
on the context, substitution variables' values can be either an actual value or a column name. These
values are defined in the SubstitutionMap. If a CheckExpression starts with a column reference, then
ColumnSelectors in the rule should be null. If ColumnSelectors has been defined, then there should be no
column reference in the left side of a condition, for example, is_between :val1 and :val2
.
For more information, see Available checks
public Map<String,String> getSubstitutionMap()
The map of substitution variable names to their values used in a check expression. Variable names should start
with a ':' (colon). Variable values can either be actual values or column names. To differentiate between the
two, column names should be enclosed in backticks, for example, ":col1": "`Column A`".
":col1": "`Column A`".
public void setSubstitutionMap(Map<String,String> substitutionMap)
The map of substitution variable names to their values used in a check expression. Variable names should start
with a ':' (colon). Variable values can either be actual values or column names. To differentiate between the
two, column names should be enclosed in backticks, for example, ":col1": "`Column A`".
substitutionMap
- The map of substitution variable names to their values used in a check expression. Variable names should
start with a ':' (colon). Variable values can either be actual values or column names. To differentiate
between the two, column names should be enclosed in backticks, for example,
":col1": "`Column A`".
public Rule withSubstitutionMap(Map<String,String> substitutionMap)
The map of substitution variable names to their values used in a check expression. Variable names should start
with a ':' (colon). Variable values can either be actual values or column names. To differentiate between the
two, column names should be enclosed in backticks, for example, ":col1": "`Column A`".
substitutionMap
- The map of substitution variable names to their values used in a check expression. Variable names should
start with a ':' (colon). Variable values can either be actual values or column names. To differentiate
between the two, column names should be enclosed in backticks, for example,
":col1": "`Column A`".
public Rule addSubstitutionMapEntry(String key, String value)
public Rule clearSubstitutionMapEntries()
public void setThreshold(Threshold threshold)
The threshold used with a non-aggregate check expression. Non-aggregate check expressions will be applied to each row in a specific column, and the threshold will be used to determine whether the validation succeeds.
threshold
- The threshold used with a non-aggregate check expression. Non-aggregate check expressions will be applied
to each row in a specific column, and the threshold will be used to determine whether the validation
succeeds.public Threshold getThreshold()
The threshold used with a non-aggregate check expression. Non-aggregate check expressions will be applied to each row in a specific column, and the threshold will be used to determine whether the validation succeeds.
public Rule withThreshold(Threshold threshold)
The threshold used with a non-aggregate check expression. Non-aggregate check expressions will be applied to each row in a specific column, and the threshold will be used to determine whether the validation succeeds.
threshold
- The threshold used with a non-aggregate check expression. Non-aggregate check expressions will be applied
to each row in a specific column, and the threshold will be used to determine whether the validation
succeeds.public List<ColumnSelector> getColumnSelectors()
List of column selectors. Selectors can be used to select columns using a name or regular expression from the dataset. Rule will be applied to selected columns.
public void setColumnSelectors(Collection<ColumnSelector> columnSelectors)
List of column selectors. Selectors can be used to select columns using a name or regular expression from the dataset. Rule will be applied to selected columns.
columnSelectors
- List of column selectors. Selectors can be used to select columns using a name or regular expression from
the dataset. Rule will be applied to selected columns.public Rule withColumnSelectors(ColumnSelector... columnSelectors)
List of column selectors. Selectors can be used to select columns using a name or regular expression from the dataset. Rule will be applied to selected columns.
NOTE: This method appends the values to the existing list (if any). Use
setColumnSelectors(java.util.Collection)
or withColumnSelectors(java.util.Collection)
if you
want to override the existing values.
columnSelectors
- List of column selectors. Selectors can be used to select columns using a name or regular expression from
the dataset. Rule will be applied to selected columns.public Rule withColumnSelectors(Collection<ColumnSelector> columnSelectors)
List of column selectors. Selectors can be used to select columns using a name or regular expression from the dataset. Rule will be applied to selected columns.
columnSelectors
- List of column selectors. Selectors can be used to select columns using a name or regular expression from
the dataset. Rule will be applied to selected columns.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.