CfnClassifierPropsMixin
- class aws_cdk.mixins_preview.aws_glue.mixins.CfnClassifierPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::Glue::Classifierresource creates an AWS Glue classifier that categorizes data sources and specifies schemas.For more information, see Adding Classifiers to a Crawler and Classifier Structure in the AWS Glue Developer Guide .
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-classifier.html
- CloudformationResource:
AWS::Glue::Classifier
- 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_glue import mixins as glue_mixins cfn_classifier_props_mixin = glue_mixins.CfnClassifierPropsMixin(glue_mixins.CfnClassifierMixinProps( csv_classifier=glue_mixins.CfnClassifierPropsMixin.CsvClassifierProperty( allow_single_column=False, contains_custom_datatype=["containsCustomDatatype"], contains_header="containsHeader", custom_datatype_configured=False, delimiter="delimiter", disable_value_trimming=False, header=["header"], name="name", quote_symbol="quoteSymbol" ), grok_classifier=glue_mixins.CfnClassifierPropsMixin.GrokClassifierProperty( classification="classification", custom_patterns="customPatterns", grok_pattern="grokPattern", name="name" ), json_classifier=glue_mixins.CfnClassifierPropsMixin.JsonClassifierProperty( json_path="jsonPath", name="name" ), xml_classifier=glue_mixins.CfnClassifierPropsMixin.XMLClassifierProperty( classification="classification", name="name", row_tag="rowTag" ) ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Glue::Classifier.- Parameters:
props (
Union[CfnClassifierMixinProps,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 = ['csvClassifier', 'grokClassifier', 'jsonClassifier', 'xmlClassifier']
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
CsvClassifierProperty
- class CfnClassifierPropsMixin.CsvClassifierProperty(*, allow_single_column=None, contains_custom_datatype=None, contains_header=None, custom_datatype_configured=None, delimiter=None, disable_value_trimming=None, header=None, name=None, quote_symbol=None)
Bases:
objectA classifier for custom
CSVcontent.- Parameters:
allow_single_column (
Union[bool,IResolvable,None]) – Enables the processing of files that contain only one column.contains_custom_datatype (
Optional[Sequence[str]]) – Indicates whether the CSV file contains custom data types.contains_header (
Optional[str]) – Indicates whether the CSV file contains a header. A value ofUNKNOWNspecifies that the classifier will detect whether the CSV file contains headings. A value ofPRESENTspecifies that the CSV file contains headings. A value ofABSENTspecifies that the CSV file does not contain headings.custom_datatype_configured (
Union[bool,IResolvable,None]) – Enables the configuration of custom data types.delimiter (
Optional[str]) – A custom symbol to denote what separates each column entry in the row.disable_value_trimming (
Union[bool,IResolvable,None]) – Specifies not to trim values before identifying the type of column values. The default value istrue.header (
Optional[Sequence[str]]) – A list of strings representing column names.name (
Optional[str]) – The name of the classifier.quote_symbol (
Optional[str]) – A custom symbol to denote what combines content into a single column value. It must be different from the column delimiter.
- 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_glue import mixins as glue_mixins csv_classifier_property = glue_mixins.CfnClassifierPropsMixin.CsvClassifierProperty( allow_single_column=False, contains_custom_datatype=["containsCustomDatatype"], contains_header="containsHeader", custom_datatype_configured=False, delimiter="delimiter", disable_value_trimming=False, header=["header"], name="name", quote_symbol="quoteSymbol" )
Attributes
- allow_single_column
Enables the processing of files that contain only one column.
- contains_custom_datatype
Indicates whether the CSV file contains custom data types.
- contains_header
Indicates whether the CSV file contains a header.
A value of
UNKNOWNspecifies that the classifier will detect whether the CSV file contains headings.A value of
PRESENTspecifies that the CSV file contains headings.A value of
ABSENTspecifies that the CSV file does not contain headings.
- custom_datatype_configured
Enables the configuration of custom data types.
- delimiter
A custom symbol to denote what separates each column entry in the row.
- disable_value_trimming
Specifies not to trim values before identifying the type of column values.
The default value is
true.
- header
A list of strings representing column names.
- name
The name of the classifier.
- quote_symbol
A custom symbol to denote what combines content into a single column value.
It must be different from the column delimiter.
GrokClassifierProperty
- class CfnClassifierPropsMixin.GrokClassifierProperty(*, classification=None, custom_patterns=None, grok_pattern=None, name=None)
Bases:
objectA classifier that uses
grokpatterns.- Parameters:
classification (
Optional[str]) – An identifier of the data format that the classifier matches, such as Twitter, JSON, Omniture logs, and so on.custom_patterns (
Optional[str]) – Optional custom grok patterns defined by this classifier. For more information, see custom patterns in Writing Custom Classifiers .grok_pattern (
Optional[str]) –The grok pattern applied to a data store by this classifier. For more information, see built-in patterns in Writing Custom Classifiers .
name (
Optional[str]) – The name of the classifier.
- 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_glue import mixins as glue_mixins grok_classifier_property = glue_mixins.CfnClassifierPropsMixin.GrokClassifierProperty( classification="classification", custom_patterns="customPatterns", grok_pattern="grokPattern", name="name" )
Attributes
- classification
An identifier of the data format that the classifier matches, such as Twitter, JSON, Omniture logs, and so on.
- custom_patterns
Optional custom grok patterns defined by this classifier.
For more information, see custom patterns in Writing Custom Classifiers .
- grok_pattern
The grok pattern applied to a data store by this classifier.
For more information, see built-in patterns in Writing Custom Classifiers .
JsonClassifierProperty
- class CfnClassifierPropsMixin.JsonClassifierProperty(*, json_path=None, name=None)
Bases:
objectA classifier for
JSONcontent.- Parameters:
json_path (
Optional[str]) – AJsonPathstring defining the JSON data for the classifier to classify. AWS Glue supports a subset ofJsonPath, as described in Writing JsonPath Custom Classifiers .name (
Optional[str]) – The name of the classifier.
- 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_glue import mixins as glue_mixins json_classifier_property = glue_mixins.CfnClassifierPropsMixin.JsonClassifierProperty( json_path="jsonPath", name="name" )
Attributes
- json_path
A
JsonPathstring defining the JSON data for the classifier to classify.AWS Glue supports a subset of
JsonPath, as described in Writing JsonPath Custom Classifiers .
XMLClassifierProperty
- class CfnClassifierPropsMixin.XMLClassifierProperty(*, classification=None, name=None, row_tag=None)
Bases:
objectA classifier for
XMLcontent.- Parameters:
classification (
Optional[str]) – An identifier of the data format that the classifier matches.name (
Optional[str]) – The name of the classifier.row_tag (
Optional[str]) – The XML tag designating the element that contains each record in an XML document being parsed. This can’t identify a self-closing element (closed by/>). An empty row element that contains only attributes can be parsed as long as it ends with a closing tag (for example,<row item_a="A" item_b="B"></row>is okay, but<row item_a="A" item_b="B" />is not).
- 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_glue import mixins as glue_mixins x_mLClassifier_property = glue_mixins.CfnClassifierPropsMixin.XMLClassifierProperty( classification="classification", name="name", row_tag="rowTag" )
Attributes
- classification
An identifier of the data format that the classifier matches.
- name
The name of the classifier.
- row_tag
The XML tag designating the element that contains each record in an XML document being parsed.
This can’t identify a self-closing element (closed by
/>). An empty row element that contains only attributes can be parsed as long as it ends with a closing tag (for example,<row item_a="A" item_b="B"></row>is okay, but<row item_a="A" item_b="B" />is not).