0

I need to create Athena Tables of Delta file format in AWS S3 Datasource using Terraform. This is creating Athena tables. I am able to get the columns name. But it is showing 0 records when i query. But i have delta files in my location. Anything am i missing here. I am using Glue Catalog to create Athena table with this reference.

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/glue_catalog_table

resource "aws_glue_catalog_table" "terraform_try" {
  name          = "Athena_table_terraform_try"
  database_name = aws_athena_database.athena_database.name
  table_type    = "EXTERNAL_TABLE"
  parameters = {
    "table_type" = "DELTA"
  }
  partition_keys {
    name = "event_date"
    type = "string"
  }
  partition_keys {
    name = "environment"
    type = "string"
  }
  storage_descriptor {
    location = "s3://bucket/delta"
    columns {
      name = "my_string"
      type = "string"
    }

    columns {
      name = "my_double"
      type = "double"
    }

    columns {
      name    = "my_date"
      type    = "date"
      comment = ""
    }
  }
}
Alex Ott
  • 80,552
  • 8
  • 87
  • 132
dude
  • 1
  • 3

0 Answers0