Skip to content

Commit 6531d75

Browse files
committed
fix(ingest): wizard iceberg catalog key is uri, not catalog_uri
pyiceberg's load_catalog requires the key to be named uri; the worker passes catalog_config to it verbatim, so every wizard-created iceberg connection failed at catalog connection. The --config path was unaffected (keys pass through as given). Test fixtures updated to use the correct key so they stop enshrining the wrong name.
1 parent a0883d0 commit 6531d75

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/client/ingest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ mod tests {
852852
"connector_type": "svc",
853853
"credentials": {"connection_string": "postgresql://u:s3cret@h/db"},
854854
"rest_config": {"client": {"auth": {"type": "bearer", "token": "tok-abc"}}},
855-
"catalog_config": {"catalog_uri": "http://c", "token": "iceberg-tok"},
855+
"catalog_config": {"uri": "http://c", "token": "iceberg-tok"},
856856
"table_names": ["users"],
857857
});
858858
let logged = redact_secret_fields(&body);

src/commands/ingest.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,9 @@ fn filesystem_credentials() -> serde_json::Value {
13761376
/// token + namespace.
13771377
fn iceberg_catalog_config() -> serde_json::Value {
13781378
let mut m = serde_json::Map::new();
1379-
m.insert("catalog_uri".into(), ask_text("Catalog URI:").into());
1379+
// pyiceberg's load_catalog requires the key "uri" (not "catalog_uri") —
1380+
// the worker passes this map to it verbatim.
1381+
m.insert("uri".into(), ask_text("Catalog URI:").into());
13801382
if let Some(w) = optional(None, "Warehouse (blank if none):") {
13811383
m.insert("warehouse".into(), w.into());
13821384
}
@@ -1574,8 +1576,7 @@ mod tests {
15741576
);
15751577
let mut args = create_args();
15761578
args.tables = vec!["ns.t".into()];
1577-
let req = build_create_request(&ice, args, Some(serde_json::json!({"catalog_uri": "u"})))
1578-
.unwrap();
1579+
let req = build_create_request(&ice, args, Some(serde_json::json!({"uri": "u"}))).unwrap();
15791580
// The catalog type defaults to rest when not specified.
15801581
assert_eq!(req.catalog_type.as_deref(), Some("rest"));
15811582
assert_eq!(req.tables, vec!["ns.t"]);

0 commit comments

Comments
 (0)