{"record":{"id":"052bb907ea0fbdd7","repo":"apache/beam","slug":"unsupported-createdisposition-value-supported-values-are","errorCode":null,"errorMessage":"Unsupported createDisposition '\" + value + \"'. Supported values are CREATE_IF_NEEDED and CREATE_NEVER.","messagePattern":"Unsupported createDisposition '\" \\+ value \\+ \"'\\. Supported values are CREATE_IF_NEEDED and CREATE_NEVER\\.","errorType":"validation","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/snowflake/src/main/java/org/apache/beam/sdk/io/snowflake/SnowflakeSchemaTransformUtils.java","lineNumber":138,"sourceCode":"  @EnsuresNonNullIf(expression = \"#1\", result = true)\n  public static boolean isNotEmpty(@Nullable String value) {\n    return value != null && !value.isEmpty();\n  }\n\n  public static StreamingLogLevel parseStreamingLogLevel(String value) {\n    try {\n      return StreamingLogLevel.valueOf(value);\n    } catch (IllegalArgumentException e) {\n      throw new IllegalArgumentException(\n          \"Unsupported debugMode '\" + value + \"'. Supported values are ERROR and INFO.\", e);\n    }\n  }\n\n  public static CreateDisposition parseCreateDisposition(String value) {\n    try {\n      return CreateDisposition.valueOf(value);\n    } catch (IllegalArgumentException e) {\n      throw new IllegalArgumentException(\n          \"Unsupported createDisposition '\"\n              + value\n              + \"'. Supported values are CREATE_IF_NEEDED and CREATE_NEVER.\",\n          e);\n    }\n  }\n\n  public static WriteDisposition parseWriteDisposition(String value) {\n    try {\n      return WriteDisposition.valueOf(value);\n    } catch (IllegalArgumentException e) {\n      throw new IllegalArgumentException(\n          \"Unsupported writeDisposition '\"\n              + value\n              + \"'. Supported values are APPEND, TRUNCATE, and EMPTY.\",\n          e);\n    }\n  }","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/snowflake/src/main/java/org/apache/beam/sdk/io/snowflake/SnowflakeSchemaTransformUtils.java#L120-L156","documentation":"parseCreateDisposition maps a configuration string to BigQuery-style CreateDisposition enum via valueOf. Unsupported strings are rethrown as IllegalArgumentException listing the only valid values: CREATE_IF_NEEDED and CREATE_NEVER.","triggerScenarios":"Passing any string other than exactly \"CREATE_IF_NEEDED\" or \"CREATE_NEVER\" to parseCreateDisposition when configuring the Snowflake sink.","commonSituations":"Typo like CREATE_IF_NEEDEd or create_if_needed (case matters); reusing disposition names from other systems (e.g. CREATE_IF_NOT_EXISTS); stale config from an older pipeline template.","solutions":["Use exactly CREATE_IF_NEEDED or CREATE_NEVER.","Normalize input with value.trim().toUpperCase(Locale.ROOT) before parsing.","Catch IllegalArgumentException around the parse call when handling external config."],"exampleFix":"// before\nparseCreateDisposition(\"CREATE_IF_NOT_EXISTS\")\n// after\nparseCreateDisposition(\"CREATE_IF_NEEDED\")","handlingStrategy":"validation","validationCode":"if (!value.equals(\"CREATE_IF_NEEDED\") && !value.equals(\"CREATE_NEVER\")) {\n  throw new IllegalArgumentException(\"createDisposition must be CREATE_IF_NEEDED or CREATE_NEVER\");\n}","typeGuard":null,"tryCatchPattern":"try { disp = SnowflakeSchemaTransformUtils.parseCreateDisposition(raw); }\ncatch (IllegalArgumentException e) { disp = CreateDisposition.CREATE_IF_NEEDED; }","preventionTips":["Prefer CreateDisposition enum constants over string parsing.","Trim and uppercase external config values.","Validate disposition strings at config-load time, not pipeline runtime."],"tags":["java","snowflake","enum","parsing"],"backgroundTag":"invalid-enum-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}