AWS::Glue::Classifier CsvClassifier
A classifier for custom CSV content.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "AllowSingleColumn" :Boolean, "ContainsHeader" :String, "Delimiter" :String, "DisableValueTrimming" :Boolean, "Header" :[ String, ... ], "Name" :String, "QuoteSymbol" :String}
YAML
AllowSingleColumn:BooleanContainsHeader:StringDelimiter:StringDisableValueTrimming:BooleanHeader:- StringName:StringQuoteSymbol:String
Properties
AllowSingleColumn-
Enables the processing of files that contain only one column.
Required: No
Type: Boolean
Update requires: No interruption
ContainsHeader-
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.Required: No
Type: String
Allowed values:
ABSENT | PRESENT | UNKNOWNUpdate requires: No interruption
Delimiter-
A custom symbol to denote what separates each column entry in the row.
Required: No
Type: String
Minimum:
1Maximum:
1Pattern:
[^\r\n]Update requires: No interruption
DisableValueTrimming-
Specifies not to trim values before identifying the type of column values. The default value is
true.Required: No
Type: Boolean
Update requires: No interruption
Header-
A list of strings representing column names.
Required: No
Type: List of String
Update requires: No interruption
Name-
The name of the classifier.
Required: No
Type: String
Minimum:
1Maximum:
255Pattern:
[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*Update requires: Replacement
QuoteSymbol-
A custom symbol to denote what combines content into a single column value. It must be different from the column delimiter.
Required: No
Type: String
Minimum:
1Maximum:
1Pattern:
[^\r\n]Update requires: No interruption
Examples
Create a custom classifier test
With AWS::Glue::Classifier you can create a custom classifier test.
JSON
{ "Description": "Amazon Glue custom classifier test", "Resources": { "MyCSVclassifier": { "Type": "AWS::Glue::Classifier", "Properties": { "CsvClassifier": { "AllowSingleColumn": true, "ContainsHeader": "PRESENT", "Delimiter": ",", "Header": [ "id", "name" ], "Name": "csvclassify", "QuoteSymbol": "\"" } } } } }
YAML
Description: Amazon Glue custom classifier test Resources: MyCSVclassifier: Type: 'AWS::Glue::Classifier' Properties: CsvClassifier: AllowSingleColumn: true ContainsHeader: PRESENT Delimiter: ',' Header: - id - name Name: csvclassify QuoteSymbol: '"'