Skip to content

Commit 3b049fb

Browse files
committed
add 'glue.id' to iceberg sink config
1 parent 0f5bae0 commit 3b049fb

File tree

5 files changed

+26
-0
lines changed

5 files changed

+26
-0
lines changed

src/connector/src/connector_common/connection.rs

+5
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ pub struct IcebergConnection {
135135
/// Path of iceberg warehouse, only applicable in storage catalog.
136136
#[serde(rename = "warehouse.path")]
137137
pub warehouse_path: Option<String>,
138+
/// Catalog id, can be omitted for storage catalog or when
139+
/// caller's AWS account ID matches glue id
140+
#[serde(rename = "glue.id")]
141+
pub glue_id: Option<String>,
138142
/// Catalog name, can be omitted for storage catalog, but
139143
/// must be set for other catalogs.
140144
#[serde(rename = "catalog.name")]
@@ -255,6 +259,7 @@ impl Connection for IcebergConnection {
255259
secret_key: self.secret_key.clone(),
256260
gcs_credential: self.gcs_credential.clone(),
257261
warehouse_path: self.warehouse_path.clone(),
262+
glue_id: self.glue_id.clone(),
258263
catalog_name: self.catalog_name.clone(),
259264
catalog_uri: self.catalog_uri.clone(),
260265
credential: self.credential.clone(),

src/connector/src/connector_common/iceberg/mod.rs

+8
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ pub struct IcebergCommon {
5757
/// Path of iceberg warehouse, only applicable in storage catalog.
5858
#[serde(rename = "warehouse.path")]
5959
pub warehouse_path: Option<String>,
60+
/// AWS Client id, can be omitted for storage catalog or when
61+
/// caller's AWS account ID matches glue id
62+
#[serde(rename = "glue.id")]
63+
pub glue_id: Option<String>,
6064
/// Catalog name, can be omitted for storage catalog, but
6165
/// must be set for other catalogs.
6266
#[serde(rename = "catalog.name")]
@@ -274,6 +278,10 @@ impl IcebergCommon {
274278
format!("https://glue.{}.amazonaws.com", region),
275279
);
276280
}
281+
282+
if let Some(glue_id) = self.glue_id.as_deref() {
283+
java_catalog_configs.insert("glue.id".to_owned(), glue_id.to_owned());
284+
}
277285
}
278286
_ => {}
279287
}

src/connector/src/sink/iceberg/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1432,6 +1432,7 @@ mod test {
14321432
secret_key: Some("hummockadmin".to_owned()),
14331433
gcs_credential: None,
14341434
catalog_type: Some("jdbc".to_owned()),
1435+
glue_id: None,
14351436
catalog_name: Some("demo".to_owned()),
14361437
database_name: Some("demo_db".to_owned()),
14371438
table_name: "demo_table".to_owned(),

src/connector/with_options_sink.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,12 @@ IcebergConfig:
447447
field_type: String
448448
comments: Path of iceberg warehouse, only applicable in storage catalog.
449449
required: false
450+
- name: glue.id
451+
field_type: String
452+
comments: |-
453+
Catalog name, can be omitted for storage catalog or when
454+
caller's AWS account ID matches glue id
455+
required: false
450456
- name: catalog.name
451457
field_type: String
452458
comments: |-

src/connector/with_options_source.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ IcebergProperties:
103103
field_type: String
104104
comments: Path of iceberg warehouse, only applicable in storage catalog.
105105
required: false
106+
- name: glue.id
107+
field_type: String
108+
comments: |-
109+
Catalog name, can be omitted for storage catalog or when
110+
caller's AWS account ID matches glue id
111+
required: false
106112
- name: catalog.name
107113
field_type: String
108114
comments: |-

0 commit comments

Comments
 (0)