risingwavelabs/risingwave · error · SinkError::Config

table.name is required for Snowflake JDBC sink

Error message

table.name is required for Snowflake JDBC sink

What it means

Required-option guard in SnowflakeSinkWriter::new: `table.name` was not supplied in the Snowflake sink config, but the JDBC writer needs a fully qualified target table to write into. It fires at writer construction after the database and schema required-option checks.

Source

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

    Jdbc(SnowflakeRedshiftSinkJdbcWriter),
}

impl SnowflakeSinkWriter {
    pub async fn new(
        config: SnowflakeV2Config,
        is_append_only: bool,
        writer_param: SinkWriterParam,
        param: SinkParam,
    ) -> Result<Self> {
        let schema = param.schema();
        let database = config.snowflake_database.ok_or_else(|| {
            SinkError::Config(anyhow!("database is required for Snowflake JDBC sink"))
        })?;
        let schema_name = config.snowflake_schema.ok_or_else(|| {
            SinkError::Config(anyhow!("schema is required for Snowflake JDBC sink"))
        })?;
        let table_name = config.snowflake_target_table_name.ok_or_else(|| {
            SinkError::Config(anyhow!("table.name is required for Snowflake JDBC sink"))
        })?;
        if config.with_s3 {
            let s3_writer = SnowflakeRedshiftSinkS3Writer::new(
                config.s3_inner.ok_or_else(|| {
                    SinkError::Config(anyhow!(
                        "S3 configuration is required for Snowflake S3 sink"
                    ))
                })?,
                schema,
                is_append_only,
                table_name,
            )?;
            Ok(Self::S3(s3_writer))
        } else {
            let jdbc_writer = SnowflakeRedshiftSinkJdbcWriter::new(
                is_append_only,
                writer_param,
                param,

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Add `snowflake.table.name = '<table>'` to the sink WITH options
  2. Confirm the exact option key (`snowflake.table.name`) from connector docs
  3. Pre-create the target table in Snowflake and use the same name

Example fix

-- before
WITH (connector='snowflake', snowflake.database='MYDB', snowflake.schema='PUBLIC', ...)
-- after
WITH (connector='snowflake', snowflake.database='MYDB', snowflake.schema='PUBLIC', snowflake.table.name='TARGET_T', ...)
Defensive patterns

Strategy: validation

Validate before calling

assert!(opts.contains_key("snowflake.table.name"), "snowflake.table.name is required");

Prevention

When it happens

Trigger: Creating a Snowflake sink whose WITH options lack `snowflake.table.name`, so `config.snowflake_target_table_name` is None in `new`.

Common situations: Setting `table.name` without the `snowflake.` prefix; relying on the sink name to be used as the table name (not supported); documentation/version drift in option names.

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