{"record":{"id":"3ba3d2fddf6f8ffb","repo":"apache/beam","slug":"s-is-not-a-supported-format-see-s-for-a-list-of-supported","errorCode":null,"errorMessage":"%s is not a supported format. See %s for a list of supported formats.","messagePattern":"(.+?) is not a supported format\\. See (.+?) for a list of supported formats\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/file-schema-transform/src/main/java/org/apache/beam/sdk/io/fileschematransform/FileWriteSchemaTransformProvider.java","lineNumber":154,"sourceCode":"                                  .build()))\n              .setRowSchema(OUTPUT_SCHEMA);\n\n      if (files.has(ERROR_TAG)) {\n        return PCollectionRowTuple.of(OUTPUT_TAG, output).and(ERROR_STRING, files.get(ERROR_TAG));\n      } else {\n        return PCollectionRowTuple.of(OUTPUT_TAG, output);\n      }\n    }\n\n    /**\n     * A helper method to retrieve the mapped {@link FileWriteSchemaTransformFormatProvider} from a\n     * {@link FileWriteSchemaTransformConfiguration#getFormat()}.\n     */\n    FileWriteSchemaTransformFormatProvider getProvider() {\n      Map<String, FileWriteSchemaTransformFormatProvider> providers =\n          FileWriteSchemaTransformFormatProviders.loadProviders();\n      if (!providers.containsKey(configuration.getFormat())) {\n        throw new IllegalArgumentException(\n            String.format(\n                \"%s is not a supported format. See %s for a list of supported formats.\",\n                configuration.getFormat(),\n                FileWriteSchemaTransformFormatProviders.class.getName()));\n      }\n      // resolves [dereference.of.nullable]\n      Optional<FileWriteSchemaTransformFormatProvider> provider =\n          Optional.ofNullable(providers.get(configuration.getFormat()));\n      checkState(provider.isPresent());\n      return provider.get();\n    }\n\n    /**\n     * Validates a {@link FileWriteSchemaTransformConfiguration} for correctness depending on its\n     * {@link FileWriteSchemaTransformConfiguration#getFormat()}.\n     */\n    static void validateConfiguration(FileWriteSchemaTransformConfiguration configuration) {\n      String format = configuration.getFormat();","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/file-schema-transform/src/main/java/org/apache/beam/sdk/io/fileschematransform/FileWriteSchemaTransformProvider.java#L136-L172","documentation":"FileWriteSchemaTransformProvider.getProvider loads all registered FileWriteSchemaTransformFormatProvider implementations (via ServiceLoader) and looks up the one named by configuration.getFormat(). If the requested format has no registered provider, it throws IllegalArgumentException listing where supported formats are enumerated. It means the requested output format isn't available at runtime.","triggerScenarios":"FileWriteSchemaTransformConfiguration.builder().setFormat(\"xlsx\") (or any format other than the registered ones like csv, parquet, avro, json, xml) applied through the write transform; case mismatch like \"CSV\" instead of \"csv\".","commonSituations":"Typo in format string; uppercase format; missing service-provider registration (META-INF/services) when using a custom provider; user assumed a format is supported without checking the provider list.","solutions":["Use a supported format string: csv, parquet, avro, json, xml (see FileWriteSchemaTransformFormatProviders javadoc)","Check the format string for typos and case (lowercase required)","If using a custom format, register its provider in META-INF/services and ensure the jar is on the classpath","Print FileWriteSchemaTransformFormatProviders.loadProviders().keySet() to see available formats"],"exampleFix":"// before\nFileWriteSchemaTransformConfiguration.builder().setFormat(\"xlsx\")...\n// after\nFileWriteSchemaTransformConfiguration.builder().setFormat(\"parquet\")...","handlingStrategy":"validation","validationCode":"Set<String> supported = FileWriteSchemaTransformFormatProviders.loadProviders().keySet();\nif (!supported.contains(format.toLowerCase()))\n  throw new IllegalArgumentException(\"Format \" + format + \" not supported. Use one of \" + supported);","typeGuard":null,"tryCatchPattern":"try {\n  transform(configuration);\n} catch (IllegalArgumentException e) {\n  if (e.getMessage().contains(\"is not a supported format\"))\n    LOG.error(\"Use one of: {}\", FileWriteSchemaTransformFormatProviders.loadProviders().keySet());\n  throw e;\n}","preventionTips":["Keep the format string lowercase and validated against the provider registry","Enumerate supported formats from loadProviders().keySet() instead of hardcoding","When adding custom formats, verify META-INF/services registration in the deployed jar"],"tags":["java","beam","schema-transform","format"],"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-14T16:17:12.679Z"}