risingwavelabs/risingwave · error · SinkError::Config

jdbc.url is required

Error message

jdbc.url is required

What it means

`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.

Source

Thrown at src/connector/src/sink/snowflake_redshift/snowflake.rs:181

fn default_intermediate_interval_schedule() -> u64 {
    1800 // Default to 0.5 hour
}

fn default_with_s3() -> bool {
    true
}

impl SnowflakeV2Config {
    /// Build JDBC Properties for the Snowflake JDBC connection (no URL parameters).
    /// Returns (`jdbc_url`, `driver_properties`).
    /// - `driver_properties` are transformed/used by the Java runner and passed to `DriverManager::getConnection(url, props)`
    ///
    /// Note: This method assumes the config has been validated by `from_btreemap`.
    pub fn build_jdbc_connection_properties(&self) -> Result<(String, Vec<(String, String)>)> {
        let jdbc_url = self
            .jdbc_url
            .clone()
            .ok_or(SinkError::Config(anyhow!("jdbc.url is required")))?;
        let username = self
            .username
            .clone()
            .ok_or(SinkError::Config(anyhow!("username is required")))?;

        let mut connection_properties: Vec<(String, String)> = vec![("user".to_owned(), username)];

        // auth_method is guaranteed to be Some after validation in from_btreemap
        match self.auth_method.as_deref().unwrap() {
            AUTH_METHOD_PASSWORD => {
                // password is guaranteed to exist by from_btreemap validation
                connection_properties.push(("password".to_owned(), self.password.clone().unwrap()));
            }
            AUTH_METHOD_KEY_PAIR_FILE => {
                // private_key_file is guaranteed to exist by from_btreemap validation
                connection_properties.push((
                    "private_key_file".to_owned(),
                    self.private_key_file.clone().unwrap(),

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Add `jdbc.url = 'jdbc:snowflake://<account>.snowflakecomputing.com'` to the sink WITH options.
  2. Recreate the sink with the full set of required options (jdbc.url, username, etc.).
  3. Validate the properties map with `SnowflakeV2SinkConfig::from_btreemap` before sink creation to fail fast.

Example fix

// before
WITH (connector='snowflake', snowflake.username='u');
// after
WITH (connector='snowflake', snowflake.username='u',
      snowflake.jdbc.url='jdbc:snowflake://acct.snowflakecomputing.com');
Defensive patterns

Strategy: validation

Validate before calling

if !props.contains_key("snowflake.jdbc.url") {
    return Err(anyhow!("snowflake.jdbc.url is required"));
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/05a886077e3d3c6a. Report an issue: GitHub.