{"record":{"id":"c30c7171dceb4f7a","repo":"risingwavelabs/risingwave","slug":"table-name-is-required","errorCode":null,"errorMessage":"table.name is required","messagePattern":"table\\.name is required","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/snowflake_redshift/snowflake.rs","lineNumber":371,"sourceCode":"\n    pub fn build_snowflake_task_ctx_jdbc_client(\n        &self,\n        is_append_only: bool,\n        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)?;","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/snowflake_redshift/snowflake.rs#L353-L389","documentation":"When building the Snowflake task context for the JDBC client, `build_snowflake_task_ctx_jdbc_client` requires the target table name option. If `snowflake_target_table_name` is None, the connector cannot know which Snowflake table to write to and returns this config error before creating any client.","triggerScenarios":"Creating a Snowflake sink without the `table.name` option (in the non-early-return path, i.e., when a client is actually needed), so `self.snowflake_target_table_name.clone().ok_or(...)` fails.","commonSituations":"Omitting `table.name` in the WITH clause, or a typo like `tablename` / `table_name` that fails to parse into the option.","solutions":["Add `table.name = '<snowflake_target_table>'` to the sink WITH options.","Verify the option key spelling matches `table.name` exactly.","Confirm the option value is non-empty after variable/secret interpolation."],"exampleFix":"// before\nWITH (\n  connector = 'snowflake',\n  snowflake.database = 'mydb',\n  snowflake.schema = 'public'\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['table.name']) throw new Error('table.name is required for snowflake sink');","typeGuard":null,"tryCatchPattern":"try { createSink(opts) } catch (e) { if (String(e).includes('table.name is required')) { /* surface missing option to user */ } }","preventionTips":["Checklist all required Snowflake options (table.name, database, schema) before CREATE SINK.","Use consistent option-key naming; `table.name` uses a dot, not underscore.","Validate the generated DDL in CI with a config schema check."],"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"}