{"record":{"id":"0a9a160aba8cb73a","repo":"risingwavelabs/risingwave","slug":"to-use-iceberg-engine-table-the-variable-iceberg","errorCode":null,"errorMessage":"to use iceberg engine table, the variable `iceberg_engine_connection` must be set.","messagePattern":"to use iceberg engine table, the variable `iceberg_engine_connection` must be set\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/frontend/src/handler/create_table.rs","lineNumber":1913,"sourceCode":"        .read_guard()\n        .get_schema_by_id(table.database_id, table.schema_id)?\n        .name()\n        .clone();\n    let iceberg_catalog_name = rw_db_name.clone();\n    let iceberg_database_name = rw_schema_name.clone();\n    let iceberg_table_name = table_name.0.last().unwrap().real_value();\n\n    let iceberg_engine_connection: String = session.config().iceberg_engine_connection();\n    let sink_decouple = session.config().sink_decouple();\n    if matches!(sink_decouple, SinkDecouple::Disable) {\n        bail!(\n            \"Iceberg engine table only supports with sink decouple, try `set sink_decouple = true` to resolve it\"\n        );\n    }\n\n    let mut connection_ref = BTreeMap::new();\n    let with_common = if iceberg_engine_connection.is_empty() {\n        bail!(\"to use iceberg engine table, the variable `iceberg_engine_connection` must be set.\");\n    } else {\n        let parts: Vec<&str> = iceberg_engine_connection.split('.').collect();\n        assert_eq!(parts.len(), 2);\n        let connection_catalog =\n            session.get_connection_by_name(Some(parts[0].to_owned()), parts[1])?;\n        if let ConnectionInfo::ConnectionParams(params) = &connection_catalog.info {\n            if params.connection_type == ConnectionType::Iceberg as i32 {\n                // With iceberg engine connection:\n                connection_ref.insert(\n                    \"connection\".to_owned(),\n                    ConnectionRefValue {\n                        connection_name: ObjectName::from(vec![\n                            Ident::from(parts[0]),\n                            Ident::from(parts[1]),\n                        ]),\n                    },\n                );\n","sourceCodeStart":1895,"sourceCodeEnd":1931,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/handler/create_table.rs#L1895-L1931","documentation":"RisingWave requires an Iceberg catalog connection to create an Iceberg engine table. The session variable `iceberg_engine_connection` identifies that connection as `<database>.<connection_name>`. If the variable is empty, `create_iceberg_engine_table` bails because it cannot resolve a catalog for the table.","triggerScenarios":"Running `CREATE TABLE ... WITH (engine = 'iceberg')` (or `CREATE TABLE ... CONNECTOR ... engine='iceberg'`) without first executing `SET iceberg_engine_connection = '<db>.<connection_name>'` in the session, or after resetting the variable.","commonSituations":"Developers new to Iceberg engine tables forget the two-step setup; running DDL from a fresh session, a BI tool connection pool, or a migration script where the SET was never issued; variable name typo so the real variable remains empty.","solutions":["Run `SET iceberg_engine_connection = '<database>.<connection_name>';` in the same session before creating the table","Create the catalog connection first with `CREATE CONNECTION <name> WITH (type='iceberg', ...)` if it does not exist","Qualify the variable value correctly as `<database>.<connection_name>` — exactly one dot"],"exampleFix":"// before\nCREATE TABLE t (...) WITH (engine = 'iceberg');\n// after\nSET iceberg_engine_connection = 'mydb.my_iceberg_conn';\nCREATE TABLE t (...) WITH (engine = 'iceberg');","handlingStrategy":"validation","validationCode":"-- run first; then only issue CREATE TABLE if a value is shown\nSHOW iceberg_engine_connection;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always SET iceberg_engine_connection in the same session/script as Iceberg engine CREATE TABLE","Create the Iceberg connection before any DDL that references it","Include the SET statement in migration/bootstrap scripts and connection-pool init SQL"],"tags":["sql","iceberg","configuration"],"backgroundTag":"missing-required-config","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"}