{"record":{"id":"9777704f999d7ee1","repo":"risingwavelabs/risingwave","slug":"task-target-completion-interval-requires-task-s","errorCode":null,"errorMessage":"`task.target_completion_interval` requires `task.serverless` to be true","messagePattern":"`task\\.target_completion_interval` requires `task\\.serverless` to be true","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/snowflake_redshift/snowflake.rs","lineNumber":261,"sourceCode":"            return Err(SinkError::Config(anyhow!(\n                \"Snowflake upsert sinks require `with_s3 = true` so all CDC rows are loaded by the serialized COPY INTO task\"\n            )));\n        }\n        let has_upsert_task_config = config.snowflake_cdc_table_name.is_some()\n            || 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())","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/snowflake_redshift/snowflake.rs#L243-L279","documentation":"`task.target_completion_interval` only tunes a serverless Snowflake task; from_btreemap rejects setting it when `task.serverless` is not true. Without serverless tasks the interval would be silently meaningless, so the connector fails fast instead.","triggerScenarios":"Creating a Snowflake upsert sink with `task.target_completion_interval` set while `task.serverless` is false or absent.","commonSituations":"Copying a serverless-task tuning snippet into a sink config that uses a regular warehouse; adding the interval option but forgetting to flip task.serverless to true.","solutions":["Add `task.serverless = true` to the WITH options","Remove `task.target_completion_interval` if you intend to use a regular warehouse-based task"],"exampleFix":"// before\nWITH (connector='snowflake', type='upsert', with_s3=true, task.target_completion_interval='15m');\n// after\nWITH (connector='snowflake', type='upsert', with_s3=true, task.serverless=true, task.target_completion_interval='15m');","handlingStrategy":"validation","validationCode":"if options.contains_key(\"task.target_completion_interval\") && options.get(\"task.serverless\").map(|v| v.as_str()) != Some(\"true\") {\n    return Err(\"task.target_completion_interval requires task.serverless = true\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set task.serverless=true when tuning target_completion_interval","Copy tuning options from serverless examples only","Validate the full WITH clause against the docs before CREATE SINK"],"tags":["snowflake","sink","config-validation","risingwave"],"backgroundTag":"conflicting-config-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"}