Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(iceberg): add 'glue.id' to iceberg sink config #20330

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/connector/src/connector_common/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ pub struct IcebergConnection {
/// Path of iceberg warehouse, only applicable in storage catalog.
#[serde(rename = "warehouse.path")]
pub warehouse_path: Option<String>,
/// 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<String>,
/// Catalog name, can be omitted for storage catalog, but
/// must be set for other catalogs.
#[serde(rename = "catalog.name")]
Expand Down Expand Up @@ -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(),
Expand Down
8 changes: 8 additions & 0 deletions src/connector/src/connector_common/iceberg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ pub struct IcebergCommon {
/// Path of iceberg warehouse, only applicable in storage catalog.
#[serde(rename = "warehouse.path")]
pub warehouse_path: Option<String>,
/// 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<String>,
/// Catalog name, can be omitted for storage catalog, but
/// must be set for other catalogs.
#[serde(rename = "catalog.name")]
Expand Down Expand Up @@ -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());
}
}
_ => {}
}
Expand Down
1 change: 1 addition & 0 deletions src/connector/src/sink/iceberg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
6 changes: 6 additions & 0 deletions src/connector/with_options_sink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down
6 changes: 6 additions & 0 deletions src/connector/with_options_source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down
Loading