From a9dca4c205900e87d9077e539c92f0f190316d99 Mon Sep 17 00:00:00 2001 From: Kuntal Basu Date: Wed, 14 Aug 2024 17:08:55 -0400 Subject: [PATCH] enabling schema evolution for oxbow controlled tables --- main.tf | 4 +++- variables.tf | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 6b445b3..30a7193 100644 --- a/main.tf +++ b/main.tf @@ -82,6 +82,8 @@ resource "aws_kinesis_firehose_delivery_stream" "this_kinesis" { locals { oxbow_lambda_unwrap_sns_event = var.enable_group_events == true ? {} : var.sns_topic_arn == "" ? {} : { UNWRAP_SNS_ENVELOPE = true } group_eventlambda_unwrap_sns_event = var.sns_topic_arn == "" ? {} : { UNWRAP_SNS_ENVELOPE = true } + oxbow_lambda_schema_evolution = var.enable_schema_evolution == false ? {} : { SCHEMA_EVOLUTION = true } + } resource "aws_lambda_function" "this_lambda" { @@ -101,7 +103,7 @@ resource "aws_lambda_function" "this_lambda" { variables = merge({ AWS_S3_LOCKING_PROVIDER = var.aws_s3_locking_provider RUST_LOG = "deltalake=${var.rust_log_deltalake_debug_level},oxbow=${var.rust_log_oxbow_debug_level}" - DYNAMO_LOCK_TABLE_NAME = var.dynamodb_table_name }, local.oxbow_lambda_unwrap_sns_event) + DYNAMO_LOCK_TABLE_NAME = var.dynamodb_table_name }, local.oxbow_lambda_unwrap_sns_event, local.oxbow_lambda_schema_evolution) } tags = var.tags } diff --git a/variables.tf b/variables.tf index ab9c711..4ede998 100644 --- a/variables.tf +++ b/variables.tf @@ -304,6 +304,12 @@ variable "enable_glue_create" { default = false } +variable "enable_schema_evolution" { + type = bool + description = "Whether to turn on schema evolution" + default = true +} + variable "glue_create_config" { type = object({ athena_workgroup_name = string // Name of AWS Athena workgroup