apache/druid · error · IAE

One or more URIs is required in parameter %s

Error message

One or more URIs is required in parameter %s

What it means

Thrown by HttpInputSourceDefn.convertUriTemplateArgs when converting a completed template-based HTTP table: the 'uris' argument list (the concrete values substituted into the template's '{}' placeholder) is missing or empty. The template alone is not enough; the actual URI fragments must be supplied.

Source

Thrown at server/src/main/java/org/apache/druid/catalog/model/table/HttpInputSourceDefn.java:282

    } else if (!sourceMap.containsKey(URIS_FIELD)) {
      convertUriArg(sourceMap, args);
    }

    // Get user and password from the table if defined, else from arguments.
    if (!sourceMap.containsKey(USERNAME_FIELD) && !sourceMap.containsKey(PASSWORD_FIELD)) {
      convertUserPasswordArgs(sourceMap, args);
    }
    if (!sourceMap.containsKey(HEADERS_FIELD)) {
      convertHeaderArg(sourceMap, args);
    }
    return convertPartialFormattedTable(table, args, columns, sourceMap);
  }

  private void convertUriTemplateArgs(Map<String, Object> jsonMap, String uriTemplate, Map<String, Object> args)
  {
    List<String> uriStrings = CatalogUtils.getStringArray(args, URIS_PARAMETER);
    if (CollectionUtils.isNullOrEmpty(uriStrings)) {
      throw new IAE("One or more URIs is required in parameter %s", URIS_PARAMETER);
    }
    final Matcher m = templateMatcher(uriTemplate);
    final List<String> uris = uriStrings.stream()
        .map(uri -> m.replaceFirst(uri))
        .collect(Collectors.toList());
    jsonMap.put(URIS_FIELD, CatalogUtils.stringListToUriList(uris));
  }

  /**
   * URIs in SQL is in the form of a string that contains a comma-delimited
   * set of URIs. Done since SQL doesn't support array scalars.
   */
  private void convertUriArg(Map<String, Object> jsonMap, Map<String, Object> args)
  {
    List<String> uris = CatalogUtils.getStringArray(args, URIS_PARAMETER);
    if (uris != null) {
      jsonMap.put(URIS_FIELD, CatalogUtils.stringListToUriList(uris));
    }

View on GitHub (pinned to 9b90983fd2)

Solutions

  1. Provide the 'uris' argument with at least one value, e.g. {"uris": ["file1.json"]}
  2. Check the form/tool that collects URI fragments is populating the args map
  3. Ensure values are the fragments to substitute into '{}', full URLs not needed

Example fix

// before
args = {"uriTemplate": "https://h/{}.json"} // uris missing
// after
args = {"uriTemplate": "https://h/{}.json", "uris": ["2024-01"]}
Defensive patterns

Strategy: validation

Validate before calling

if (uriTemplate != null && (args.get("uris") == null || ((java.util.List<String>) args.get("uris")).isEmpty())) { throw new IAE("uris required"); }

Prevention

When it happens

Trigger: convertCompletedTable on a template-based table whose args map has no URIS_PARAMETER entries (null or empty string array).

Common situations: Finalizing a table from partial form data where the user never entered URI values; an API caller that set uriTemplate but not the uris argument; whitespace-only lists passing isNullOrEmpty checks incorrectly upstream.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/651c1f6059d9f961. Report an issue: GitHub.