mirror of
https://github.com/Sea-Haven-Industries/apm-wo-analysis.git
synced 2026-10-04 19:32:03 +00:00
Move apm-wo-analysis into seahaven-prod under workspace apm-wo-analysis-prod with in-repo hcptf/githubdeploy IAM, stub Lambdas, and GitHub Actions zip CD.
43 lines
1.2 KiB
HCL
43 lines
1.2 KiB
HCL
resource "aws_glue_catalog_database" "analytics" {
|
|
name = local.glue_database
|
|
}
|
|
|
|
resource "aws_glue_catalog_table" "snapshots" {
|
|
name = local.glue_table
|
|
database_name = aws_glue_catalog_database.analytics.name
|
|
table_type = "EXTERNAL_TABLE"
|
|
|
|
parameters = {
|
|
classification = "parquet"
|
|
EXTERNAL = "TRUE"
|
|
"projection.enabled" = "true"
|
|
"projection.dt.type" = "date"
|
|
"projection.dt.format" = "yyyy-MM-dd"
|
|
"projection.dt.range" = "2026-01-01,NOW"
|
|
"storage.location.template" = "s3://${aws_s3_bucket.exports.bucket}/analytics/dt=$${dt}/"
|
|
}
|
|
|
|
partition_keys {
|
|
name = "dt"
|
|
type = "string"
|
|
}
|
|
|
|
storage_descriptor {
|
|
location = "s3://${aws_s3_bucket.exports.bucket}/analytics/"
|
|
input_format = "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat"
|
|
output_format = "org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat"
|
|
|
|
ser_de_info {
|
|
serialization_library = "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe"
|
|
}
|
|
|
|
dynamic "columns" {
|
|
for_each = local.snapshot_columns
|
|
|
|
content {
|
|
name = columns.value.name
|
|
type = columns.value.type
|
|
}
|
|
}
|
|
}
|
|
}
|