{"record":{"id":"d274e3503b8475c5","repo":"risingwavelabs/risingwave","slug":"schema-is-required","errorCode":null,"errorMessage":"schema is required","messagePattern":"schema is required","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/snowflake_redshift/snowflake.rs","lineNumber":379,"sourceCode":"            && 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\n                .clone()\n                .ok_or(SinkError::Config(anyhow!(\"stage is required\")))?;\n            snowflake_task_ctx.stage = Some(stage);\n            if is_append_only {","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/snowflake_redshift/snowflake.rs#L361-L397","documentation":"The Snowflake sink requires the schema component of the fully-qualified target table. `build_snowflake_task_ctx_jdbc_client` reads `snowflake.schema` and returns this config error if the option is missing, right after validating the database.","triggerScenarios":"CREATE SINK with Snowflake connector lacking the `snowflake.schema` option (when a JDBC client is built, i.e., not the append-only/no-schema-change early-return path).","commonSituations":"Assuming `public` is defaulted by the connector, or leaving the option out when the value was expected from an environment template.","solutions":["Add `snowflake.schema = '<schema>'` (commonly `public`) to the WITH options.","Verify the option key spelling.","Confirm the schema exists in the target Snowflake database."],"exampleFix":"// before\nWITH (\n  connector = 'snowflake',\n  snowflake.database = 'mydb',\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.schema']) throw new Error('snowflake.schema is required for snowflake sink');","typeGuard":null,"tryCatchPattern":"try { createSink(opts) } catch (e) { if (String(e).includes('schema is required')) { /* add snowflake.schema and retry */ } }","preventionTips":["Never assume `public` is the default; set `snowflake.schema` explicitly.","Verify the schema exists in the target database before creating the sink.","Include schema in the standard sink option 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"}