I am using below terraform script to create Athena Iceberg table,
resource "aws_glue_catalog_table" "athena_threshold_table" {
name = "my_config_table"
database_name = aws_athena_database.db.name
description = "Athena Iceberg table holds the information about configuration"
parameters = {
"classification" = "parquet",
"vacuum_max_snapshot_age_seconds" = "604800",
"table_type" = "iceberg",
"optimize_rewrite_delete_file_threshold" = "10",
"write_target_data_file_size_bytes" = "536870912",
"vacuum_min_snapshots_to_keep" = "1"
}
storage_descriptor {
location = "s3://my_s3_bucket/recon/athena/config_table/"
input_format = "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat"
output_format = "org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat"
ser_de_info {
name = "my_config_table"
serialization_library = "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe"
}
columns {
name = "entityname"
type = "string"
}
columns {
name = "fromsystem"
type = "string"
}
}
}
for the above terraform error i am getting below error :
GENERIC_USER_ERROR: Detected Iceberg type table without metadata location. Please make sure an Iceberg-enabled compute engine such as Athena or EMR Spark is used to create the table, or the table is created by using the Iceberg open source AWS library iceberg-aws. Setting table_type parameter in Glue metastore to create an Iceberg table is not supported.
I need to create Athena iceberg table using terraform script, Kindly help me to resolve the error.