{"record":{"id":"2e70cf74f7cc4f1d","repo":"risingwavelabs/risingwave","slug":"intermediate-table-name-is-required","errorCode":null,"errorMessage":"intermediate.table.name is required","messagePattern":"intermediate\\.table\\.name is required","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/snowflake_redshift/snowflake.rs","lineNumber":405,"sourceCode":"\n        let (jdbc_url, connection_properties) = self.build_jdbc_connection_properties()?;\n        let client = JdbcJniClient::new_with_props(jdbc_url, connection_properties)?;\n\n        if self.with_s3 {\n            let stage = self\n                .stage\n                .clone()\n                .ok_or(SinkError::Config(anyhow!(\"stage is required\")))?;\n            snowflake_task_ctx.stage = Some(stage);\n            if is_append_only {\n                snowflake_task_ctx.pipe_name = Some(format!(\"{}_pipe\", target_table_name));\n            }\n        }\n        if !is_append_only {\n            let cdc_table_name = self\n                .snowflake_cdc_table_name\n                .clone()\n                .ok_or(SinkError::Config(anyhow!(\n                    \"intermediate.table.name is required\"\n                )))?;\n            snowflake_task_ctx.cdc_table_name = Some(cdc_table_name.clone());\n            snowflake_task_ctx.writer_target_interval_seconds = self.writer_target_interval_seconds;\n            snowflake_task_ctx.task_serverless = self.task_serverless;\n            snowflake_task_ctx.task_target_completion_interval =\n                self.task_target_completion_interval.clone();\n            if !self.task_serverless {\n                snowflake_task_ctx.warehouse = Some(\n                    self.snowflake_warehouse\n                        .clone()\n                        .ok_or(SinkError::Config(anyhow!(\"warehouse is required\")))?,\n                );\n            }\n            let pk_column_names: Vec<_> = schema\n                .fields\n                .iter()\n                .enumerate()","sourceCodeStart":387,"sourceCodeEnd":423,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/snowflake_redshift/snowflake.rs#L387-L423","documentation":"For non-append-only sinks (upsert/Debezium CDC), the Snowflake connector writes to an intermediate CDC table before merging into the target. `build_snowflake_task_ctx_jdbc_client` requires the `intermediate.table.name` option and throws this config error when it is absent.","triggerScenarios":"Creating a non-append-only Snowflake sink (e.g., with a primary key / upsert) without `snowflake_cdc_table_name` / `intermediate.table.name` in the WITH options.","commonSituations":"Following append-only sink examples for a CDC/upsert sink, or dropping the option when changing the sink's append-only property.","solutions":["Add `intermediate.table.name = '<intermediate_table>'` to the WITH options.","Ensure the intermediate table name differs from the target table name and exists (or is creatable) in Snowflake.","If the data is truly append-only, define the sink without a primary key so the intermediate table is not required."],"exampleFix":"// before\nWITH (\n  connector = 'snowflake',\n  primary_key = 'id'\n)\n// after\nWITH (\n  connector = 'snowflake',\n  primary_key = 'id',\n  intermediate.table.name = 'my_table_rw_cdc'\n)","handlingStrategy":"validation","validationCode":"if (opts.primary_key && !opts['intermediate.table.name']) {\n  throw new Error('intermediate.table.name is required for non-append-only snowflake sink');\n}","typeGuard":null,"tryCatchPattern":"try { createSink(opts) } catch (e) { if (String(e).includes('intermediate.table.name is required')) { /* add intermediate table option */ } }","preventionTips":["For upsert/CDC sinks, always plan the intermediate CDC table alongside the target table.","Use a naming convention like `<target>_rw_cdc` for intermediate tables.","Only use primary keys when updates/deletes are actually needed."],"tags":["snowflake","sink","config","cdc"],"backgroundTag":"missing-required-config-field","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"}