{"record":{"id":"50b9fd22d2597080","repo":"risingwavelabs/risingwave","slug":"e-50b9fd","errorCode":null,"errorMessage":"{e}","messagePattern":"\\{e\\}","errorType":"exception","errorClass":"SinkError::Iceberg","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/iceberg/create_table.rs","lineNumber":112,"sourceCode":"}\n\n/// Returns `true` if this call created the table, `false` if it already existed.\npub(super) async fn create_table_if_not_exists_impl(\n    config: &IcebergConfig,\n    param: &SinkParam,\n) -> Result<bool> {\n    let catalog = config.create_catalog().await?;\n    let table_id = config\n        .full_table_name()\n        .context(\"Unable to parse table name\")?;\n    let namespace = table_id.namespace().clone();\n    let table_name = table_id.name().to_owned();\n    create_namespace_if_not_exists(catalog.as_ref(), &namespace).await?;\n\n    if catalog\n        .table_exists(&table_id)\n        .await\n        .map_err(|e| SinkError::Iceberg(anyhow!(e)))?\n    {\n        return Ok(false);\n    }\n\n    if config.table_format_version() < FormatVersion::V3\n        && let Some(column) = param\n            .columns\n            .iter()\n            .find(|column| column.data_type.contains_variant())\n    {\n        return Err(SinkError::Config(anyhow!(\n            \"creating an Iceberg table with VARIANT column `{}` requires `format_version = '3'`\",\n            column.name\n        )));\n    }\n\n    let iceberg_create_table_arrow_convert = IcebergCreateTableArrowConvert::default();\n    // convert risingwave schema -> arrow schema -> iceberg schema","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/iceberg/create_table.rs#L94-L130","documentation":"This error wraps a failure from the Iceberg catalog's `table_exists` check. Before creating the table, the code queries the catalog to see whether the table already exists; any catalog-level failure (network, auth, namespace missing, REST error) is wrapped into SinkError::Iceberg with the raw catalog error message.","triggerScenarios":"create_table_if_not_exists_impl calls catalog.table_exists(&table_id) and the catalog returns Err — e.g. the REST/Hive/Glue catalog is unreachable, credentials are invalid, or the namespace does not resolve.","commonSituations":"Misconfigured catalog URI or credentials in the sink WITH options; network egress blocked from the RisingWave node to the catalog service; catalog service down; table identifier malformed for the catalog type.","solutions":["Inspect the wrapped `{e}` message — it is the underlying catalog client error — and fix the root cause (URL, auth, DNS).","Verify catalog connectivity from the RisingWave host (curl the REST catalog endpoint / check the metastore).","Confirm catalog.name/uri/authentication options in the sink config are correct for the catalog type.","Retry if the failure was transient (network blip, catalog restart)."],"exampleFix":"// before\ncatalog.name = 'rest', catalog.uri = 'http://iceberg-catalog:8181' // service down\n// after: fix endpoint/credentials or start the catalog service, then retry\nCREATE SINK ... WITH (connector='iceberg', catalog.type='rest', catalog.uri='http://correct-host:8181', ...);","handlingStrategy":"retry","validationCode":"// Check catalog reachability before creating the sink\ncurl -sS -o /dev/null -w '%{http_code}' http://iceberg-catalog:8181/v1/config","typeGuard":null,"tryCatchPattern":"match create_table_if_not_exists(...).await {\n    Err(SinkError::Iceberg(e)) if is_transient(&e) => retry_with_backoff(3, || create_table_if_not_exists(...)),\n    other => other?,\n}","preventionTips":["Validate catalog URI and credentials in the sink WITH options before deploying.","Monitor catalog service health from RisingWave hosts.","Ensure network egress to the catalog endpoint is allowed.","Check that the table identifier is valid for the catalog type."],"tags":["rust","iceberg","catalog","network"],"backgroundTag":"http-error-response","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}