{"record":{"id":"5bd540bbba250f1d","repo":"apache/druid","slug":"must-provide-a-value-for-the-s-parameter","errorCode":null,"errorMessage":"Must provide a value for the [%s] parameter","messagePattern":"Must provide a value for the \\[(.+?)\\] parameter","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"server/src/main/java/org/apache/druid/catalog/model/table/FormattedInputSourceDefn.java","lineNumber":147,"sourceCode":"      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(\n          \"Format type [%s] for property [%s] is not valid\",\n          formatTag,\n          FORMAT_PARAMETER\n      );\n    }\n    return formatDefn.convertFromArgs(args, columns, jsonMapper);\n  }\n\n  /**\n   * Converted a formatted external table given the table definition, function\n   * args, columns and the merged generic JSON map representing the input source.\n   *\n   * @param table     the resolved external table from the catalog\n   * @param args      values of arguments from an SQL table function. Here we consider","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/catalog/model/table/FormattedInputSourceDefn.java#L129-L165","documentation":"Thrown by FormattedInputSourceDefn.convertArgsToFormat when converting catalog table arguments into an InputFormat: the 'format' parameter is absent from the argument map. The catalog requires an explicit format tag to select the registered InputFormatDefn that performs the conversion.","triggerScenarios":"Calling convertPartialFormattedTable (e.g. when resolving a partial external table definition) with an args map that lacks the FORMAT_PARAMETER ('format') entry, so CatalogUtils.getString returns null.","commonSituations":"Defining an external table in the Druid catalog without specifying the 'format' property (e.g. json, csv) alongside the input source; a typo like 'formt' or a properties map where the format key was accidentally removed during editing.","solutions":["Add the 'format' property to the table's argument map, e.g. {\"format\": \"json\"}","Check for typos in the format property key (it must match FORMAT_PARAMETER exactly)","Verify the table definition JSON passed to the catalog API includes the format field before calling convertPartialFormattedTable"],"exampleFix":"// before\nMap<String, Object> args = Map.of(\"type\", \"http\");\n// after\nMap<String, Object> args = Map.of(\"type\", \"http\", \"format\", \"json\");","handlingStrategy":"validation","validationCode":"if (args.get(\"format\") == null) { throw new IllegalArgumentException(\"'format' is required\"); }","typeGuard":"boolean hasFormat(Map<String,Object> args) { Object f = args.get(\"format\"); return f instanceof String && !((String) f).isEmpty(); }","tryCatchPattern":"try { tableDefn.convertPartialFormattedTable(...); } catch (IAE e) { if (e.getMessage().contains(\"format\")) { /* prompt user for format */ } else { throw e; } }","preventionTips":["Always set the format property when defining external tables","Validate table args against required keys before submission","Use the catalog builder API which pairs format with source"],"tags":["catalog","missing-parameter","input-format"],"backgroundTag":"missing-required-argument","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}