risingwavelabs/risingwave · error · SinkError::Config

schema is required

Error message

schema is required

What it means

The Snowflake sink requires the schema component of the fully-qualified target table. `build_snowflake_task_ctx_jdbc_client` reads `snowflake.schema` and returns this config error if the option is missing, right after validating the database.

Source

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

            && 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)?;

        if self.with_s3 {
            let stage = self
                .stage
                .clone()
                .ok_or(SinkError::Config(anyhow!("stage is required")))?;
            snowflake_task_ctx.stage = Some(stage);
            if is_append_only {

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Add `snowflake.schema = '<schema>'` (commonly `public`) to the WITH options.
  2. Verify the option key spelling.
  3. Confirm the schema exists in the target Snowflake database.

Example fix

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

Strategy: validation

Validate before calling

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

Try / catch

try { createSink(opts) } catch (e) { if (String(e).includes('schema is required')) { /* add snowflake.schema and retry */ } }

Prevention

When it happens

Trigger: CREATE SINK with Snowflake connector lacking the `snowflake.schema` option (when a JDBC client is built, i.e., not the append-only/no-schema-change early-return path).

Common situations: Assuming `public` is defaulted by the connector, or leaving the option out when the value was expected from an environment template.

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