{"record":{"id":"6f59d4541deec888","repo":"apache/druid","slug":"value-s-for-property-s-must-include-a-pla","errorCode":null,"errorMessage":"Value [%s] for property %s must include a '{}' placeholder","messagePattern":"Value \\[(.+?)\\] for property (.+?) must include a '(.+?)' placeholder","errorType":"validation","errorClass":"IAE","httpStatus":null,"severity":"error","filePath":"server/src/main/java/org/apache/druid/catalog/model/table/HttpInputSourceDefn.java","lineNumber":201,"sourceCode":"\n  @Override\n  protected void auditInputSource(Map<String, Object> jsonMap)\n  {\n    // A partial table may not include the URI parameter. For example, we might\n    // define an HTTP input source \"with URIs to be named later.\" Even though the\n    // input source is partial, we still want to validate the other parameters.\n    // The HttpInputSource will fail if the URIs is not set. So, we have to make\n    // up a fake one just so we can validate the other fields by asking the\n    // input source to deserialize itself from the jsonMap.\n    jsonMap.putIfAbsent(URIS_PARAMETER, \"http://bogus.com\");\n  }\n\n  private Matcher templateMatcher(String uriTemplate)\n  {\n    Pattern p = Pattern.compile(\"\\\\{}\");\n    Matcher m = p.matcher(uriTemplate);\n    if (!m.find()) {\n      throw new IAE(\n          \"Value [%s] for property %s must include a '{}' placeholder\",\n          uriTemplate,\n          URI_TEMPLATE_PROPERTY\n      );\n    }\n    return m;\n  }\n\n  @Override\n  protected List<ParameterDefn> adHocTableFnParameters()\n  {\n    return CatalogUtils.concatLists(URI_PARAMS, CatalogUtils.concatLists(USER_PWD_PARAMS, HEADERS_PARAMS));\n  }\n\n  @Override\n  protected void convertArgsToSourceMap(Map<String, Object> jsonMap, Map<String, Object> args)\n  {\n    jsonMap.put(InputSource.TYPE_PROPERTY, HttpInputSource.TYPE_KEY);","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/catalog/model/table/HttpInputSourceDefn.java#L183-L219","documentation":"Thrown by HttpInputSourceDefn.templateMatcher when the uriTemplate property value does not contain the required '{}' placeholder. Templates work by replacing the first '{}' occurrence with each concrete URI string, so a template without the placeholder is unusable.","triggerScenarios":"validate() calls templateMatcher on the uriTemplate property, or convertUriTemplateArgs (via convertCompletedTable) applies it; the regex \\{} finds no match.","commonSituations":"Writing a template like \"https://host/files\" instead of \"https://host/{}.json\"; using '*' or '{uri}' as the placeholder out of habit from other template systems; trimming the placeholder accidentally in config.","solutions":["Add a '{}' placeholder at the substitution point in the template, e.g. \"https://host/data/{}.json\"","Replace any other placeholder syntax with exactly '{}'","Escape nothing: '{}' is matched literally by the validator"],"exampleFix":"// before\nuriTemplate = \"https://example.com/data\"\n// after\nuriTemplate = \"https://example.com/data/{}.json\"","handlingStrategy":"validation","validationCode":"if (uriTemplate != null && !uriTemplate.contains(\"{}\")) { throw new IAE(\"template must contain {}\"); }","typeGuard":null,"tryCatchPattern":"try { validate(t); } catch (IAE e) { if (e.getMessage().contains(\"placeholder\")) { /* fix template */ } else { throw e; } }","preventionTips":["Always include exactly one {} in templates","Don't use other placeholder syntaxes","Test templates with a sample substitution"],"tags":["catalog","http","uri-template"],"backgroundTag":"invalid-url-format","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"}