CfnRulesetPropsMixin
- class aws_cdk.mixins_preview.aws_databrew.mixins.CfnRulesetPropsMixin(props, *, strategy=None)
Bases:
MixinSpecifies a new ruleset that can be used in a profile job to validate the data quality of a dataset.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-databrew-ruleset.html
- CloudformationResource:
AWS::DataBrew::Ruleset
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_databrew import mixins as databrew_mixins cfn_ruleset_props_mixin = databrew_mixins.CfnRulesetPropsMixin(databrew_mixins.CfnRulesetMixinProps( description="description", name="name", rules=[databrew_mixins.CfnRulesetPropsMixin.RuleProperty( check_expression="checkExpression", column_selectors=[databrew_mixins.CfnRulesetPropsMixin.ColumnSelectorProperty( name="name", regex="regex" )], disabled=False, name="name", substitution_map=[databrew_mixins.CfnRulesetPropsMixin.SubstitutionValueProperty( value="value", value_reference="valueReference" )], threshold=databrew_mixins.CfnRulesetPropsMixin.ThresholdProperty( type="type", unit="unit", value=123 ) )], tags=[CfnTag( key="key", value="value" )], target_arn="targetArn" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::DataBrew::Ruleset.- Parameters:
props (
Union[CfnRulesetMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['description', 'name', 'rules', 'tags', 'targetArn']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
ColumnSelectorProperty
- class CfnRulesetPropsMixin.ColumnSelectorProperty(*, name=None, regex=None)
Bases:
objectSelector of a column from a dataset for profile job configuration.
One selector includes either a column name or a regular expression.
- Parameters:
name (
Optional[str]) – The name of a column from a dataset.regex (
Optional[str]) – A regular expression for selecting a column from a dataset.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_databrew import mixins as databrew_mixins column_selector_property = databrew_mixins.CfnRulesetPropsMixin.ColumnSelectorProperty( name="name", regex="regex" )
Attributes
- name
The name of a column from a dataset.
- regex
A regular expression for selecting a column from a dataset.
RuleProperty
- class CfnRulesetPropsMixin.RuleProperty(*, check_expression=None, column_selectors=None, disabled=None, name=None, substitution_map=None, threshold=None)
Bases:
objectRepresents a single data quality requirement that should be validated in the scope of this dataset.
- Parameters:
check_expression (
Optional[str]) – 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 columnn reference in the left side of a condition, for example,is_between :val1 and :val2.column_selectors (
Union[IResolvable,Sequence[Union[IResolvable,ColumnSelectorProperty,Dict[str,Any]]],None]) – 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.disabled (
Union[bool,IResolvable,None]) – 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.name (
Optional[str]) – The name of the rule.substitution_map (
Union[IResolvable,Sequence[Union[IResolvable,SubstitutionValueProperty,Dict[str,Any]]],None]) – 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”.``threshold (
Union[IResolvable,ThresholdProperty,Dict[str,Any],None]) – 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.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_databrew import mixins as databrew_mixins rule_property = databrew_mixins.CfnRulesetPropsMixin.RuleProperty( check_expression="checkExpression", column_selectors=[databrew_mixins.CfnRulesetPropsMixin.ColumnSelectorProperty( name="name", regex="regex" )], disabled=False, name="name", substitution_map=[databrew_mixins.CfnRulesetPropsMixin.SubstitutionValueProperty( value="value", value_reference="valueReference" )], threshold=databrew_mixins.CfnRulesetPropsMixin.ThresholdProperty( type="type", unit="unit", value=123 ) )
Attributes
- check_expression
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 columnn reference in the left side of a condition, for example,is_between :val1 and :val2.
- column_selectors
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.
- 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.
- name
The name of the rule.
- substitution_map
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”.``
- 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.
SubstitutionValueProperty
- class CfnRulesetPropsMixin.SubstitutionValueProperty(*, value=None, value_reference=None)
Bases:
objectA key-value pair to associate an expression’s substitution variable names with their values.
- Parameters:
value (
Optional[str]) – Value or column name.value_reference (
Optional[str]) – Variable name.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_databrew import mixins as databrew_mixins substitution_value_property = databrew_mixins.CfnRulesetPropsMixin.SubstitutionValueProperty( value="value", value_reference="valueReference" )
Attributes
- value
Value or column name.
ThresholdProperty
- class CfnRulesetPropsMixin.ThresholdProperty(*, type=None, unit=None, value=None)
Bases:
objectThe threshold used with a non-aggregate check expression.
The non-aggregate check expression will be applied to each row in a specific column. Then the threshold will be used to determine whether the validation succeeds.
- Parameters:
type (
Optional[str]) – The type of a threshold. Used for comparison of an actual count of rows that satisfy the rule to the threshold value.unit (
Optional[str]) – Unit of threshold value. Can be either a COUNT or PERCENTAGE of the full sample size used for validation.value (
Union[int,float,None]) – The value of a threshold.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_databrew import mixins as databrew_mixins threshold_property = databrew_mixins.CfnRulesetPropsMixin.ThresholdProperty( type="type", unit="unit", value=123 )
Attributes
- type
The type of a threshold.
Used for comparison of an actual count of rows that satisfy the rule to the threshold value.
- unit
Unit of threshold value.
Can be either a COUNT or PERCENTAGE of the full sample size used for validation.
- value
The value of a threshold.