risingwavelabs/risingwave · error · SinkError::Config

table.name is required

Error message

table.name is required

What it means

When building the Snowflake task context for the JDBC client, `build_snowflake_task_ctx_jdbc_client` requires the target table name option. If `snowflake_target_table_name` is None, the connector cannot know which Snowflake table to write to and returns this config error before creating any client.

Source

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

    pub fn build_snowflake_task_ctx_jdbc_client(
        &self,
        is_append_only: bool,
        schema: &Schema,
        pk_indices: &Vec<usize>,
    ) -> Result<Option<(SnowflakeTaskContext, JdbcJniClient)>> {
        if !self.auto_schema_change
            && is_append_only
            && !self.create_table_if_not_exists
            && !self.with_s3
        {
            // append-only + no auto schema change is not need to create a client
            return Ok(None);
        }
        let target_table_name = self
            .snowflake_target_table_name
            .clone()
            .ok_or(SinkError::Config(anyhow!("table.name is required")))?;
        let database = self
            .snowflake_database
            .clone()
            .ok_or(SinkError::Config(anyhow!("database is required")))?;
        let schema_name = self
            .snowflake_schema
            .clone()
            .ok_or(SinkError::Config(anyhow!("schema is required")))?;
        let mut snowflake_task_ctx = SnowflakeTaskContext {
            target_table_name: target_table_name.clone(),
            database,
            schema_name,
            schema: schema.clone(),
            ..Default::default()
        };

        let (jdbc_url, connection_properties) = self.build_jdbc_connection_properties()?;
        let client = JdbcJniClient::new_with_props(jdbc_url, connection_properties)?;

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Add `table.name = '<snowflake_target_table>'` to the sink WITH options.
  2. Verify the option key spelling matches `table.name` exactly.
  3. Confirm the option value is non-empty after variable/secret interpolation.

Example fix

// before
WITH (
  connector = 'snowflake',
  snowflake.database = 'mydb',
  snowflake.schema = 'public'
)
// after
WITH (
  connector = 'snowflake',
  snowflake.database = 'mydb',
  snowflake.schema = 'public',
  table.name = 'my_table'
)
Defensive patterns

Strategy: validation

Validate before calling

if (!opts['table.name']) throw new Error('table.name is required for snowflake sink');

Try / catch

try { createSink(opts) } catch (e) { if (String(e).includes('table.name is required')) { /* surface missing option to user */ } }

Prevention

When it happens

Trigger: Creating a Snowflake sink without the `table.name` option (in the non-early-return path, i.e., when a client is actually needed), so `self.snowflake_target_table_name.clone().ok_or(...)` fails.

Common situations: Omitting `table.name` in the WITH clause, or a typo like `tablename` / `table_name` that fails to parse into the option.

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/c30c7171dceb4f7a. Report an issue: GitHub.