{"record":{"id":"51e01e46c60e6f80","repo":"apache/druid","slug":"format-type-s-for-property-s-is-not-valid","errorCode":null,"errorMessage":"Format type [%s] for property [%s] is not valid","messagePattern":"Format type \\[(.+?)\\] for property \\[(.+?)\\] is not valid","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"server/src/main/java/org/apache/druid/catalog/model/table/FormattedInputSourceDefn.java","lineNumber":133,"sourceCode":"              prop.type().sqlName(),\n              existing.type().sqlName()\n          );\n        }\n      }\n    }\n    return CatalogUtils.concatLists(properties, toAdd);\n  }\n\n  @Override\n  protected InputFormat convertTableToFormat(ResolvedExternalTable table)\n  {\n    final String formatTag = CatalogUtils.getString(table.inputFormatMap, InputFormat.TYPE_PROPERTY);\n    if (formatTag == null) {\n      throw new IAE(\"[%s] property must be provided\", InputFormat.TYPE_PROPERTY);\n    }\n    final InputFormatDefn formatDefn = formats.get(formatTag);\n    if (formatDefn == null) {\n      throw new IAE(\n          \"Format type [%s] for property [%s] is not valid\",\n          formatTag,\n          InputFormat.TYPE_PROPERTY\n      );\n    }\n    return formatDefn.convertFromTable(table);\n  }\n\n  @Override\n  protected InputFormat convertArgsToFormat(Map<String, Object> args, List<ColumnSpec> columns, ObjectMapper jsonMapper)\n  {\n    final String formatTag = CatalogUtils.getString(args, FORMAT_PARAMETER);\n    if (formatTag == null) {\n      throw new IAE(\"Must provide a value for the [%s] parameter\", FORMAT_PARAMETER);\n    }\n    final InputFormatDefn formatDefn = formats.get(formatTag);\n    if (formatDefn == null) {\n      throw new IAE(","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/catalog/model/table/FormattedInputSourceDefn.java#L115-L151","documentation":"After reading the format 'type' property, convertTableToFormat looks it up in the registry of InputFormatDefn instances; an unknown tag means no registered format definition matches, so this IAE is thrown with the invalid tag and the property name.","triggerScenarios":"Setting the inputFormatMap 'type' to a value not registered with this FormattedInputSourceDefn (e.g. a typo like 'jsonl' or a format from an extension that is not loaded on the coordinator).","commonSituations":"Typos in format type ('csvs', 'jsonl'); querying a table created on a cluster with a format extension that is missing on the current node; case mismatches in the type tag.","solutions":["Correct the 'type' value to a registered format tag (e.g. csv, json, orc, parquet, protobuf).","Install/enable the extension that registers the needed InputFormatDefn.","List valid formats via the SQL table function metadata or docs.","Check for case differences and use the exact tag the defn's typeValue() returns."],"exampleFix":"// before\n\"inputFormat\": {\"type\": \"jsonl\"}\n// after\n\"inputFormat\": {\"type\": \"json\"}","handlingStrategy":"validation","validationCode":"Set<String> valid = Set.of(\"csv\",\"tsv\",\"json\",\"jsonline\",\"ndjson\",\"orc\",\"parquet\",\"protobuf\",\"avro\",\"delimited\");\nString t = (String) fmt.get(\"type\");\nif (t == null || !valid.contains(t)) throw new IllegalArgumentException(\"unknown format type: \" + t);","typeGuard":null,"tryCatchPattern":"try { format = defn.convertTableToFormat(table); } catch (IAE e) { if (e.getMessage().contains(\"is not valid\")) { String tag = normalizeFormatTag(fmt.get(\"type\")); fmt.put(\"type\", tag); format = defn.convertTableToFormat(table); } }","preventionTips":["Use exact registered format tags from Druid docs","Enable the extensions providing needed formats on every node","Watch for typos and case differences in type tags","Cross-check tags across coordinator/router/task nodes"],"tags":["druid","input-format","unknown-type","registry"],"backgroundTag":"invalid-enum-value","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}