risingwavelabs/risingwave · error · SinkError::Config
schema is required for Snowflake JDBC sink
Error message
schema is required for Snowflake JDBC sink
What it means
`SnowflakeSink::new` requires `snowflake_schema` from the sink config; when it is None this Config error is returned. The schema (Snowflake namespace) is needed to locate the target table, stage, and pipe objects.
Source
Thrown at src/connector/src/sink/snowflake_redshift/snowflake.rs:594
pub enum SnowflakeSinkWriter {
S3(SnowflakeRedshiftSinkS3Writer),
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(View on GitHub (pinned to 6469eb736d)
Solutions
- Add `snowflake.schema = '<schema>'` to the sink WITH options
- Ensure you are not confusing the RisingWave schema with `snowflake.schema` (the Snowflake namespace)
- Validate all required Snowflake options: database, schema, table.name
Example fix
-- before WITH (connector='snowflake', snowflake.database='MYDB', snowflake.table.name='t', ...) -- after WITH (connector='snowflake', snowflake.database='MYDB', snowflake.schema='PUBLIC', snowflake.table.name='t', ...)
Defensive patterns
Strategy: validation
Validate before calling
assert!(opts.contains_key("snowflake.schema"), "snowflake.schema is required"); Prevention
- Set snowflake.schema explicitly; do not rely on Snowflake defaults
- Distinguish RisingWave schema from the snowflake.schema option
When it happens
Trigger: Creating a Snowflake JDBC or S3 sink without the `snowflake.schema` WITH option, so `config.snowflake_schema` is None in `new`.
Common situations: Omitting the schema assuming the user's default schema applies; confusing RisingWave's internal schema with the Snowflake schema option; typos in the option name.
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
- database is required for Snowflake JDBC sink
- table.name is required for Snowflake JDBC sink
- intermediate.table.name is required for non-append-only sink
- auth.method=key_pair_object must not set `password`
- ambiguous auth: multiple auth options provided; remove one o
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/759f4fd733936403.
Report an issue: GitHub.