{"record":{"id":"36e966f998e3009b","repo":"risingwavelabs/risingwave","slug":"task-serverless-must-not-be-combined-with-wareh","errorCode":null,"errorMessage":"`task.serverless` must not be combined with `warehouse`","messagePattern":"`task\\.serverless` must not be combined with `warehouse`","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/snowflake_redshift/snowflake.rs","lineNumber":266,"sourceCode":"            || properties.contains_key(\"write.target.interval.seconds\")\n            || config.snowflake_warehouse.is_some()\n            || config.task_serverless\n            || config.task_target_completion_interval.is_some();\n        if config.r#type != SINK_TYPE_UPSERT && has_upsert_task_config {\n            return Err(SinkError::Config(anyhow!(\n                \"`intermediate.table.name`, `write.target.interval.seconds`, `warehouse`, \\\n                 `task.serverless`, and `task.target_completion_interval` require `{}` = {}\",\n                SINK_TYPE_OPTION,\n                SINK_TYPE_UPSERT\n            )));\n        }\n        if config.task_target_completion_interval.is_some() && !config.task_serverless {\n            return Err(SinkError::Config(anyhow!(\n                \"`task.target_completion_interval` requires `task.serverless` to be true\"\n            )));\n        }\n        if config.task_serverless && config.snowflake_warehouse.is_some() {\n            return Err(SinkError::Config(anyhow!(\n                \"`task.serverless` must not be combined with `warehouse`\"\n            )));\n        }\n\n        // Normalize and validate authentication method\n        let has_password = config.password.is_some();\n        let has_file = config.private_key_file.is_some();\n        let has_pem = config.private_key_pem.as_deref().is_some();\n\n        let normalized_auth_method = match config\n            .auth_method\n            .as_deref()\n            .map(|s| s.trim().to_ascii_lowercase())\n        {\n            Some(method) if method == AUTH_METHOD_PASSWORD => {\n                if !has_password {\n                    return Err(SinkError::Config(anyhow!(\n                        \"auth.method=password requires `password`\"","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/snowflake_redshift/snowflake.rs#L248-L284","documentation":"Serverless Snowflake tasks cannot specify a warehouse, since Snowflake allocates compute automatically. from_btreemap rejects combining `task.serverless = true` with a `warehouse` option to surface the incompatibility at sink creation.","triggerScenarios":"Creating a Snowflake upsert sink with both `task.serverless = true` and `warehouse = ...` in the WITH options.","commonSituations":"Template sink DDL that includes a warehouse, then enabling task.serverless for cost savings without removing the warehouse; migrating an existing warehouse-task config to serverless.","solutions":["Remove the `warehouse` option from the WITH clause","Or remove `task.serverless = true` if you specifically need to run on a named warehouse"],"exampleFix":"// before\nWITH (connector='snowflake', type='upsert', with_s3=true, task.serverless=true, warehouse='COMPUTE_WH');\n// after\nWITH (connector='snowflake', type='upsert', with_s3=true, task.serverless=true);","handlingStrategy":"validation","validationCode":"if options.get(\"task.serverless\").map(|v| v.as_str()) == Some(\"true\") && options.contains_key(\"warehouse\") {\n    return Err(\"task.serverless conflicts with warehouse\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Choose one compute model: serverless OR named warehouse, never both","Strip warehouse from templates when enabling serverless tasks","Document the exclusion in team sink DDL standards"],"tags":["snowflake","sink","config-validation","risingwave"],"backgroundTag":"mutually-exclusive-options","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"}