risingwavelabs/risingwave · error · SinkError::Config
intermediate.table.name is required for append-only sink
Error message
intermediate.table.name is required for append-only sink
What it means
In the Redshift sink's `validate`, a non-append-only (upsert/Debezium) sink must specify an intermediate CDC table (`cdc_table`, i.e. `intermediate.table.name`) used to stage changes. If the config lacks `cdc_table` while `is_append_only` is false, this SinkError::Config is returned.
Source
Thrown at src/connector/src/sink/snowflake_redshift/redshift.rs:221
const SINK_NAME: &'static str = REDSHIFT_SINK;
crate::impl_validate_sink_unknown_fields!();
async fn validate(&self) -> Result<()> {
if self.config.create_table_if_not_exists {
let client = self.config.build_client()?;
let schema = self.param.schema();
let build_table_sql = build_create_table_sql(
self.config.schema.as_deref(),
&self.config.table,
&schema,
false,
)?;
client.execute_sql_sync(vec![build_table_sql]).await?;
if !self.is_append_only {
let cdc_table = self.config.cdc_table.as_ref().ok_or_else(|| {
SinkError::Config(anyhow!(
"intermediate.table.name is required for append-only sink"
))
})?;
let cdc_schema_for_create = self
.config
.intermediate_schema
.as_deref()
.or(self.config.schema.as_deref());
let build_cdc_table_sql =
build_create_table_sql(cdc_schema_for_create, cdc_table, &schema, true)?;
client.execute_sql_sync(vec![build_cdc_table_sql]).await?;
}
}
Ok(())
}
fn support_schema_change() -> bool {
trueView on GitHub (pinned to 6469eb736d)
Solutions
- Add `intermediate.table.name = '<cdc_table>'` to the sink properties
- Create/use the intermediate staging table in Redshift that matches the sink schema
- If the sink truly only inserts data, ensure it is declared append-only so cdc_table isn't required
Example fix
// before WITH ( connector = 'redshift', ... ) -- after WITH ( connector = 'redshift', ..., 'intermediate.table.name' = 'rw_cdc_table' )
Defensive patterns
Strategy: validation
Validate before calling
// before creating a non-append-only redshift sink
if !is_append_only && !props.contains_key("intermediate.table.name") {
return Err("intermediate.table.name is required for non-append-only redshift sink");
} Prevention
- Remember: any sink with a primary key is non-append-only and needs the intermediate table
- Create the staging table in Redshift ahead of time
- Document required properties per sink type for your team
When it happens
Trigger: Creating a Redshift sink with data that contains updates/deletes (not append-only) without setting the `intermediate.table.name` property.
Common situations: Users creating an upsert sink from a source with primary keys but forgetting the intermediate table setting; migrating configs where the property was renamed.
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
- SinkError::Config(anyhow!(e))
- Primary key columns not found. Please set the `primary_key`
- intermediate.table.name is required for non-append-only sink
- S3 configuration is required for S3 sink
- should have meta client
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/cc2160d0d339bf7d.
Report an issue: GitHub.