risingwavelabs/risingwave · error
missing `database.name` in CDC properties
Error message
missing `database.name` in CDC properties
What it means
Raised by `query_sql_server_lsns` when `database.name` is missing from the CDC properties. The database name is set on the tiberius `Config` so the LSN query runs against the correct SQL Server database with CDC change tables.
Source
Thrown at src/connector/src/source/cdc/enumerator/mod.rs:298
.ok_or_else(|| anyhow!("missing `hostname` in CDC properties"))?;
let port = self
.properties
.get("port")
.ok_or_else(|| anyhow!("missing `port` in CDC properties"))?
.parse::<u16>()
.context("failed to parse `port` as a u16")?;
let username = self
.properties
.get("username")
.ok_or_else(|| anyhow!("missing `username` in CDC properties"))?;
let password = self
.properties
.get("password")
.ok_or_else(|| anyhow!("missing `password` in CDC properties"))?;
let database = self
.properties
.get("database.name")
.ok_or_else(|| anyhow!("missing `database.name` in CDC properties"))?;
let mut config = Config::new();
config.host(hostname);
config.port(port);
config.database(database);
config.authentication(tiberius::AuthMethod::sql_server(username, password));
config.trust_cert();
let mut client = SqlServerClient::new_with_config(config).await?;
let row = client
.inner_client
.simple_query(
"SELECT \
sys.fn_cdc_get_max_lsn() AS max_lsn, \
(SELECT MIN(sys.fn_cdc_get_min_lsn(capture_instance)) FROM cdc.change_tables) AS min_lsn"
.to_owned(),
)
.await?View on GitHub (pinned to 6469eb736d)
Solutions
- Add `database.name` (exact key, with dot) to the CDC source properties
- Check for key-name typos such as `database_name` or plain `database`
- Recreate the table with `database.name = '<db>'` in the with clause
- Inspect the properties map actually passed to the enumerator to confirm key names
Example fix
// before WITH (connector = 'cdc', hostname = 'h', database = 'db') // after WITH (connector = 'cdc', hostname = 'h', database.name = 'db')
Defensive patterns
Strategy: validation
Validate before calling
if !properties.contains_key("database.name") {
return Err("CDC source is missing required property: database.name".into());
} Prevention
- Remember the dotted key is `database.name`, not `database` or `database_name`
- List the exact required keys in the connector documentation/examples
When it happens
Trigger: Calling `monitor_sql_server_lsns` on a SqlServerEnumerator whose `properties` map lacks the `database.name` key (note the dotted key name).
Common situations: User supplies `database` instead of `database.name` (key-name mismatch); the with clause omits the database; property flattening/escaping strips the dotted key.
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
- missing `hostname` in CDC properties
- missing `port` in CDC properties
- missing `username` in CDC properties
- missing `password` in CDC properties
- missing required property 'hostname' for MySQL CDC source
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/b4c7671c08cd5d69.
Report an issue: GitHub.