Skip to content

fix: Make s3tables catalog public #918

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

Merged
merged 1 commit into from
Feb 8, 2025
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
1 change: 1 addition & 0 deletions crates/catalog/s3tables/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ aws-config = { workspace = true }
aws-sdk-s3tables = "1.8.0"
iceberg = { workspace = true }
serde_json = { workspace = true }
typed-builder = { workspace = true }
uuid = { workspace = true, features = ["v4"] }

[dev-dependencies]
Expand Down
14 changes: 7 additions & 7 deletions crates/catalog/s3tables/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ use iceberg::{
Catalog, Error, ErrorKind, Namespace, NamespaceIdent, Result, TableCommit, TableCreation,
TableIdent,
};
use typed_builder::TypedBuilder;

use crate::utils::{create_metadata_location, create_sdk_config};

/// S3Tables catalog configuration.
#[derive(Debug)]
#[derive(Debug, TypedBuilder)]
pub struct S3TablesCatalogConfig {
/// Unlike other buckets, S3Tables bucket is not a physical bucket, but a virtual bucket
/// that is managed by s3tables. We can't directly access the bucket with path like
Expand All @@ -48,8 +49,10 @@ pub struct S3TablesCatalogConfig {
/// - `aws_access_key_id`: The AWS access key ID to use.
/// - `aws_secret_access_key`: The AWS secret access key to use.
/// - `aws_session_token`: The AWS session token to use.
#[builder(default)]
properties: HashMap<String, String>,
/// Endpoint URL for the catalog.
#[builder(default, setter(strip_option(fallback = endpoint_url_opt)))]
endpoint_url: Option<String>,
}

Expand Down Expand Up @@ -515,12 +518,9 @@ mod tests {
None => return Ok(None),
};

let properties = HashMap::new();
let config = S3TablesCatalogConfig {
table_bucket_arn,
properties,
endpoint_url: None,
};
let config = S3TablesCatalogConfig::builder()
.table_bucket_arn(table_bucket_arn)
.build();

Ok(Some(S3TablesCatalog::new(config).await?))
}
Expand Down
2 changes: 2 additions & 0 deletions crates/catalog/s3tables/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@

mod catalog;
mod utils;

pub use catalog::*;
Loading