AWS Glue Classifier

This page shows how to write Terraform and CloudFormation for AWS Glue Classifier and write them securely.

aws_glue_classifier (Terraform)

The Classifier in AWS Glue can be configured in Terraform with the resource name aws_glue_classifier. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub

glue.tf#L10
resource "aws_glue_classifier" "example" {
  name = "example"

  csv_classifier {
    allow_single_column    = false
    contains_header        = "PRESENT"
main.tf#L7
resource "aws_glue_classifier" "this" {
  name = var.name

  dynamic "csv_classifier" {
    for_each = var.csv_classifier
    content {

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides a Glue Classifier resource.

NOTE: It is only valid to create one type of classifier (csv, grok, JSON, or XML). Changing classifier types will recreate the classifier.

AWS::Glue::Classifier (CloudFormation)

The Classifier in Glue can be configured in CloudFormation with the resource name AWS::Glue::Classifier. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

template.yml#L9
    Type: AWS::Glue::Classifier
    Properties:
      CsvClassifier:
        CsvClassifier
      GrokClassifier:
        GrokClassifier
glue-crawler.yml#L41
    Type: AWS::Glue::Classifier
    Properties:
      GrokClassifier:
        Name: "CrawlerClassifier"
        Classification: "wikiData"
        GrokPattern: "%{NOTSPACE:language} %{NOTSPACE:page_title} %{NUMBER:hits:long} %{NUMBER:retrieved_size:long}"
gas.yml#L102
  #   Type: AWS::Glue::Classifier
  #   Properties:
  #     GrokClassifier:
  #       Name: "CrawlerClassifier"
  #       Classification: "wikiData"
  #       GrokPattern: "%{NOTSPACE:language} %{NOTSPACE:page_title} %{NUMBER:hits:long} %{NUMBER:retrieved_size:long}"
aws-glue-classifier.yaml#L5
    Type: AWS::Glue::Classifier
glue.yaml#L32
    Type: AWS::Glue::Classifier
    Properties:
      CsvClassifier:
        AllowSingleColumn: false
        ContainsHeader: ABSENT
        Delimiter: ' '
twitter_analytics.json#L93
      "Type": "AWS::Glue::Classifier",
      "Properties": {
        "JsonClassifier": {
          "Name": "json_classifier",
          "JsonPath" : "$[*]"
        }
GlueClassifierSpecification.json#L3
    "AWS::Glue::Classifier.XMLClassifier": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-xmlclassifier.html",
      "Properties": {
        "RowTag": {
          "Required": true,
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-xmlclassifier.html#cfn-glue-classifier-xmlclassifier-rowtag",
GlueClassifierSpecification.json#L3
    "AWS::Glue::Classifier.XMLClassifier": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-xmlclassifier.html",
      "Properties": {
        "RowTag": {
          "Required": true,
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-xmlclassifier.html#cfn-glue-classifier-xmlclassifier-rowtag",
GlueClassifierSpecification.json#L3
    "AWS::Glue::Classifier.XMLClassifier": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-xmlclassifier.html",
      "Properties": {
        "RowTag": {
          "Required": true,
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-xmlclassifier.html#cfn-glue-classifier-xmlclassifier-rowtag",
glue_crawler_gdelt.json#L10
            "Type": "AWS::Glue::Classifier",
            "Properties": {
                "CsvClassifier": {
                    "Name": "classifier-gdelt-csv",
                    "Delimiter": "\t",
                    "QuoteSymbol": "\"",

Parameters

Explanation in CloudFormation Registry

The AWS::Glue::Classifier resource 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.

Frequently asked questions

What is AWS Glue Classifier?

AWS Glue Classifier is a resource for Glue of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Glue Classifier?

For Terraform, the akemyy/beer and niveklabs/aws source code examples are useful. See the Terraform Example section for further details.

For CloudFormation, the MohamedMesrah/SAM-Resources, ozzyince/notes-api and d-smith/glue-athena-s3 source code examples are useful. See the CloudFormation Example section for further details.