{"record":{"id":"b1ce0616ca77bd51","repo":"risingwavelabs/risingwave","slug":"database-is-required","errorCode":null,"errorMessage":"database is required","messagePattern":"database is required","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/snowflake_redshift/snowflake.rs","lineNumber":375,"sourceCode":"        schema: &Schema,\n        pk_indices: &Vec<usize>,\n    ) -> Result<Option<(SnowflakeTaskContext, JdbcJniClient)>> {\n        if !self.auto_schema_change\n            && is_append_only\n            && !self.create_table_if_not_exists\n            && !self.with_s3\n        {\n            // append-only + no auto schema change is not need to create a client\n            return Ok(None);\n        }\n        let target_table_name = self\n            .snowflake_target_table_name\n            .clone()\n            .ok_or(SinkError::Config(anyhow!(\"table.name is required\")))?;\n        let database = self\n            .snowflake_database\n            .clone()\n            .ok_or(SinkError::Config(anyhow!(\"database is required\")))?;\n        let schema_name = self\n            .snowflake_schema\n            .clone()\n            .ok_or(SinkError::Config(anyhow!(\"schema is required\")))?;\n        let mut snowflake_task_ctx = SnowflakeTaskContext {\n            target_table_name: target_table_name.clone(),\n            database,\n            schema_name,\n            schema: schema.clone(),\n            ..Default::default()\n        };\n\n        let (jdbc_url, connection_properties) = self.build_jdbc_connection_properties()?;\n        let client = JdbcJniClient::new_with_props(jdbc_url, connection_properties)?;\n\n        if self.with_s3 {\n            let stage = self\n                .stage","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/snowflake_redshift/snowflake.rs#L357-L393","documentation":"Snowflake tables are addressed with the three-part name database.schema.table. `build_snowflake_task_ctx_jdbc_client` requires the `snowflake.database` option; if absent, it cannot construct the JDBC connection/task context and throws this config error immediately after checking `table.name`.","triggerScenarios":"Creating a Snowflake sink without `snowflake.database` in the WITH options while a JDBC client is being built (sink creation path).","commonSituations":"Assuming the user's default database applies, or omitting the option when copying examples that had it set via a variable.","solutions":["Add `snowflake.database = '<database>'` to the sink WITH options.","Check spelling of the option key (`snowflake.database`).","Ensure any templated value for the database resolves to a non-empty string."],"exampleFix":"// before\nWITH (\n  connector = 'snowflake',\n  snowflake.schema = 'public',\n  table.name = 'my_table'\n)\n// after\nWITH (\n  connector = 'snowflake',\n  snowflake.database = 'mydb',\n  snowflake.schema = 'public',\n  table.name = 'my_table'\n)","handlingStrategy":"validation","validationCode":"if (!opts['snowflake.database']) throw new Error('snowflake.database is required for snowflake sink');","typeGuard":null,"tryCatchPattern":"try { createSink(opts) } catch (e) { if (String(e).includes('database is required')) { /* add snowflake.database and retry */ } }","preventionTips":["Always specify the full three-part table name inputs (database, schema, table.name).","Do not rely on the Snowflake user's default database.","Centralize database/schema defaults in one template."],"tags":["snowflake","sink","config"],"backgroundTag":"missing-required-config-field","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}