risingwavelabs/risingwave · error · SinkError::Config
warehouse is required
Error message
warehouse is required
What it means
For non-append-only sinks on non-serverless Snowflake accounts, the merge task runs on a virtual warehouse. `build_snowflake_task_ctx_jdbc_client` requires the `warehouse` option when `task.serverless` is false (the default) and throws this config error if it is missing.
Solutions
- Add `warehouse = '<warehouse_name>'` (e.g., `COMPUTE_WH`) to the WITH options.
- Or set `task.serverless = true` if your Snowflake account uses serverless tasks, making the warehouse optional.
- Verify the warehouse exists and the configured Snowflake role has USAGE permission on it.
Example fix
// before WITH ( connector = 'snowflake', primary_key = 'id', intermediate.table.name = 'my_table_rw_cdc' ) // after WITH ( connector = 'snowflake', primary_key = 'id', intermediate.table.name = 'my_table_rw_cdc', warehouse = 'COMPUTE_WH' )
Defensive patterns
Strategy: validation
Validate before calling
if (opts.primary_key && !opts.warehouse && opts['task.serverless'] !== true) {
throw new Error('warehouse is required unless task.serverless = true');
} Try / catch
try { createSink(opts) } catch (e) { if (String(e).includes('warehouse is required')) { /* add warehouse or enable task.serverless */ } } Prevention
- Record whether your Snowflake account uses serverless tasks and set `task.serverless` accordingly.
- Ensure the configured warehouse exists and the role has USAGE on it.
- Include `warehouse` in the standard CDC sink template for non-serverless accounts.
When it happens
Trigger: Creating a non-append-only Snowflake sink without `snowflake.warehouse` in the WITH options, and without `task.serverless = true`.
Common situations: Forgetting the warehouse on standard Snowflake deployments, or examples written for Snowflake serverless (which doesn't need a warehouse) being used on a regular account.
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
- ambiguous auth: multiple auth options provided; remove one…
- auth.method=key_pair_object must not set `password`
- database is required
- database is required for Snowflake JDBC sink
- intermediate.table.name is required
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/39c3863169019cb6.
Report an issue: GitHub.
Appendix: source
Thrown at src/connector/src/sink/snowflake_redshift/snowflake.rs:417
}
}
if !is_append_only {
let cdc_table_name = self
.snowflake_cdc_table_name
.clone()
.ok_or(SinkError::Config(anyhow!(
"intermediate.table.name is required"
)))?;
snowflake_task_ctx.cdc_table_name = Some(cdc_table_name.clone());
snowflake_task_ctx.writer_target_interval_seconds = self.writer_target_interval_seconds;
snowflake_task_ctx.task_serverless = self.task_serverless;
snowflake_task_ctx.task_target_completion_interval =
self.task_target_completion_interval.clone();
if !self.task_serverless {
snowflake_task_ctx.warehouse = Some(
self.snowflake_warehouse
.clone()
.ok_or(SinkError::Config(anyhow!("warehouse is required")))?,
);
}
let pk_column_names: Vec<_> = schema
.fields
.iter()
.enumerate()
.filter(|(index, _)| pk_indices.contains(index))
.map(|(_, field)| field.name.clone())
.collect();
if pk_column_names.is_empty() {
return Err(SinkError::Config(anyhow!(
"Primary key columns not found. Please set the `primary_key` column in the sink properties, or ensure that the sink contains the primary key columns from the upstream."
)));
}
snowflake_task_ctx.pk_column_names = Some(pk_column_names);
snowflake_task_ctx.all_column_names = Some(
schema
.fieldsView on GitHub (pinned to 6469eb736d)