{"record":{"id":"05a886077e3d3c6a","repo":"risingwavelabs/risingwave","slug":"jdbc-url-is-required","errorCode":null,"errorMessage":"jdbc.url is required","messagePattern":"jdbc\\.url is required","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/snowflake_redshift/snowflake.rs","lineNumber":181,"sourceCode":"fn default_intermediate_interval_schedule() -> u64 {\n    1800 // Default to 0.5 hour\n}\n\nfn default_with_s3() -> bool {\n    true\n}\n\nimpl SnowflakeV2Config {\n    /// Build JDBC Properties for the Snowflake JDBC connection (no URL parameters).\n    /// Returns (`jdbc_url`, `driver_properties`).\n    /// - `driver_properties` are transformed/used by the Java runner and passed to `DriverManager::getConnection(url, props)`\n    ///\n    /// Note: This method assumes the config has been validated by `from_btreemap`.\n    pub fn build_jdbc_connection_properties(&self) -> Result<(String, Vec<(String, String)>)> {\n        let jdbc_url = self\n            .jdbc_url\n            .clone()\n            .ok_or(SinkError::Config(anyhow!(\"jdbc.url is required\")))?;\n        let username = self\n            .username\n            .clone()\n            .ok_or(SinkError::Config(anyhow!(\"username is required\")))?;\n\n        let mut connection_properties: Vec<(String, String)> = vec![(\"user\".to_owned(), username)];\n\n        // auth_method is guaranteed to be Some after validation in from_btreemap\n        match self.auth_method.as_deref().unwrap() {\n            AUTH_METHOD_PASSWORD => {\n                // password is guaranteed to exist by from_btreemap validation\n                connection_properties.push((\"password\".to_owned(), self.password.clone().unwrap()));\n            }\n            AUTH_METHOD_KEY_PAIR_FILE => {\n                // private_key_file is guaranteed to exist by from_btreemap validation\n                connection_properties.push((\n                    \"private_key_file\".to_owned(),\n                    self.private_key_file.clone().unwrap(),","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/snowflake_redshift/snowflake.rs#L163-L199","documentation":"`build_jdbc_connection_properties` on the Snowflake sink config requires `jdbc.url` to construct the JDBC client for Snowflake tasks. When `config.jdbc_url` is `None`, it throws this Config error. The method assumes prior validation in `from_btreemap`, so a missing URL indicates the property was never provided.","triggerScenarios":"Calling `build_snowflake_task_ctx_jdbc_client` (which calls `build_jdbc_connection_properties`) with a SnowflakeV2SinkConfig whose `jdbc_url` is None, i.e. the `jdbc.url` WITH option was absent.","commonSituations":"Snowflake sink created without `jdbc.url` in the WITH clause; user configured only account/warehouse identifiers assuming URL is derived; config hand-assembled bypassing property validation.","solutions":["Add `jdbc.url = 'jdbc:snowflake://<account>.snowflakecomputing.com'` to the sink WITH options.","Recreate the sink with the full set of required options (jdbc.url, username, etc.).","Validate the properties map with `SnowflakeV2SinkConfig::from_btreemap` before sink creation to fail fast."],"exampleFix":"// before\nWITH (connector='snowflake', snowflake.username='u');\n// after\nWITH (connector='snowflake', snowflake.username='u',\n      snowflake.jdbc.url='jdbc:snowflake://acct.snowflakecomputing.com');","handlingStrategy":"validation","validationCode":"if !props.contains_key(\"snowflake.jdbc.url\") {\n    return Err(anyhow!(\"snowflake.jdbc.url is required\"));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep a checked checklist of required Snowflake sink options (jdbc.url, username, schema, database, warehouse).","Call from_btreemap validation before issuing CREATE SINK."],"tags":["rust","snowflake","jdbc","sink-config"],"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"}