diff --git a/src/connector/src/connector_common/connection.rs b/src/connector/src/connector_common/connection.rs index 3604b1bd2f99c..89e7711929ce5 100644 --- a/src/connector/src/connector_common/connection.rs +++ b/src/connector/src/connector_common/connection.rs @@ -135,6 +135,10 @@ pub struct IcebergConnection { /// Path of iceberg warehouse, only applicable in storage catalog. #[serde(rename = "warehouse.path")] pub warehouse_path: Option, + /// Catalog id, can be omitted for storage catalog or when + /// caller's AWS account ID matches glue id + #[serde(rename = "glue.id")] + pub glue_id: Option, /// Catalog name, can be omitted for storage catalog, but /// must be set for other catalogs. #[serde(rename = "catalog.name")] @@ -255,6 +259,7 @@ impl Connection for IcebergConnection { secret_key: self.secret_key.clone(), gcs_credential: self.gcs_credential.clone(), warehouse_path: self.warehouse_path.clone(), + glue_id: self.glue_id.clone(), catalog_name: self.catalog_name.clone(), catalog_uri: self.catalog_uri.clone(), credential: self.credential.clone(), diff --git a/src/connector/src/connector_common/iceberg/mod.rs b/src/connector/src/connector_common/iceberg/mod.rs index c04e20e53c202..936177668d765 100644 --- a/src/connector/src/connector_common/iceberg/mod.rs +++ b/src/connector/src/connector_common/iceberg/mod.rs @@ -57,6 +57,10 @@ pub struct IcebergCommon { /// Path of iceberg warehouse, only applicable in storage catalog. #[serde(rename = "warehouse.path")] pub warehouse_path: Option, + /// AWS Client id, can be omitted for storage catalog or when + /// caller's AWS account ID matches glue id + #[serde(rename = "glue.id")] + pub glue_id: Option, /// Catalog name, can be omitted for storage catalog, but /// must be set for other catalogs. #[serde(rename = "catalog.name")] @@ -274,6 +278,10 @@ impl IcebergCommon { format!("https://glue.{}.amazonaws.com", region), ); } + + if let Some(glue_id) = self.glue_id.as_deref() { + java_catalog_configs.insert("glue.id".to_owned(), glue_id.to_owned()); + } } _ => {} } diff --git a/src/connector/src/sink/iceberg/mod.rs b/src/connector/src/sink/iceberg/mod.rs index f84d0aa2cb339..a18287062bd47 100644 --- a/src/connector/src/sink/iceberg/mod.rs +++ b/src/connector/src/sink/iceberg/mod.rs @@ -1432,6 +1432,7 @@ mod test { secret_key: Some("hummockadmin".to_owned()), gcs_credential: None, catalog_type: Some("jdbc".to_owned()), + glue_id: None, catalog_name: Some("demo".to_owned()), database_name: Some("demo_db".to_owned()), table_name: "demo_table".to_owned(), diff --git a/src/connector/with_options_sink.yaml b/src/connector/with_options_sink.yaml index 819e597fec448..15bdba601ba78 100644 --- a/src/connector/with_options_sink.yaml +++ b/src/connector/with_options_sink.yaml @@ -447,6 +447,12 @@ IcebergConfig: field_type: String comments: Path of iceberg warehouse, only applicable in storage catalog. required: false + - name: glue.id + field_type: String + comments: |- + AWS Client id, can be omitted for storage catalog or when + caller's AWS account ID matches glue id + required: false - name: catalog.name field_type: String comments: |- diff --git a/src/connector/with_options_source.yaml b/src/connector/with_options_source.yaml index 5b6545e7086f8..cb9329190b903 100644 --- a/src/connector/with_options_source.yaml +++ b/src/connector/with_options_source.yaml @@ -103,6 +103,12 @@ IcebergProperties: field_type: String comments: Path of iceberg warehouse, only applicable in storage catalog. required: false + - name: glue.id + field_type: String + comments: |- + AWS Client id, can be omitted for storage catalog or when + caller's AWS account ID matches glue id + required: false - name: catalog.name field_type: String comments: |-