{"record":{"id":"39c3863169019cb6","repo":"risingwavelabs/risingwave","slug":"warehouse-is-required","errorCode":null,"errorMessage":"warehouse is required","messagePattern":"warehouse is required","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/snowflake_redshift/snowflake.rs","lineNumber":417,"sourceCode":"            }\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()\n                .filter(|(index, _)| pk_indices.contains(index))\n                .map(|(_, field)| field.name.clone())\n                .collect();\n            if pk_column_names.is_empty() {\n                return Err(SinkError::Config(anyhow!(\n                    \"Primary key columns not found. Please set the `primary_key` column in the sink properties, or ensure that the sink contains the primary key columns from the upstream.\"\n                )));\n            }\n            snowflake_task_ctx.pk_column_names = Some(pk_column_names);\n            snowflake_task_ctx.all_column_names = Some(\n                schema\n                    .fields","sourceCodeStart":399,"sourceCodeEnd":435,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/snowflake_redshift/snowflake.rs#L399-L435","documentation":"For non-append-only sinks on non-serverless Snowflake accounts, the merge task runs on a virtual warehouse. `build_snowflake_task_ctx_jdbc_client` requires the `warehouse` option when `task.serverless` is false (the default) and throws this config error if it is missing.","triggerScenarios":"Creating a non-append-only Snowflake sink without `snowflake.warehouse` in the WITH options, and without `task.serverless = true`.","commonSituations":"Forgetting the warehouse on standard Snowflake deployments, or examples written for Snowflake serverless (which doesn't need a warehouse) being used on a regular account.","solutions":["Add `warehouse = '<warehouse_name>'` (e.g., `COMPUTE_WH`) to the WITH options.","Or set `task.serverless = true` if your Snowflake account uses serverless tasks, making the warehouse optional.","Verify the warehouse exists and the configured Snowflake role has USAGE permission on it."],"exampleFix":"// before\nWITH (\n  connector = 'snowflake',\n  primary_key = 'id',\n  intermediate.table.name = 'my_table_rw_cdc'\n)\n// after\nWITH (\n  connector = 'snowflake',\n  primary_key = 'id',\n  intermediate.table.name = 'my_table_rw_cdc',\n  warehouse = 'COMPUTE_WH'\n)","handlingStrategy":"validation","validationCode":"if (opts.primary_key && !opts.warehouse && opts['task.serverless'] !== true) {\n  throw new Error('warehouse is required unless task.serverless = true');\n}","typeGuard":null,"tryCatchPattern":"try { createSink(opts) } catch (e) { if (String(e).includes('warehouse is required')) { /* add warehouse or enable task.serverless */ } }","preventionTips":["Record whether your Snowflake account uses serverless tasks and set `task.serverless` accordingly.","Ensure the configured warehouse exists and the role has USAGE on it.","Include `warehouse` in the standard CDC sink template for non-serverless accounts."],"tags":["snowflake","sink","config","warehouse"],"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-23T08:17:48.524Z"}