apache/druid · error · IAE

External HTTP tables must provide either a URI or a %s prope

Error message

External HTTP tables must provide either a URI or a %s property

What it means

Thrown by HttpInputSourceDefn.validate when an external HTTP table specifies neither a URI nor the uriTemplate property. An HTTP input source must know which endpoint(s) to fetch data from, so at least one addressing mechanism is mandatory.

Source

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

  @Override
  protected Class<? extends InputSource> inputSourceClass()
  {
    return HttpInputSource.class;
  }

  @Override
  public void validate(ResolvedExternalTable table)
  {
    final Map<String, Object> sourceMap = table.inputSourceMap;
    final boolean hasUri = sourceMap.containsKey(URIS_FIELD);
    final String uriTemplate = table.resolvedTable().stringProperty(URI_TEMPLATE_PROPERTY);
    final boolean hasTemplate = uriTemplate != null;
    final boolean hasFormat = table.inputFormatMap != null;
    final boolean hasColumns = !CollectionUtils.isNullOrEmpty(table.resolvedTable().spec().columns());

    if (!hasUri && !hasTemplate) {
      throw new IAE(
          "External HTTP tables must provide either a URI or a %s property",
          URI_TEMPLATE_PROPERTY
      );
    }
    if (hasUri && hasTemplate) {
      throw new IAE(
          "External HTTP tables must provide only one of a URI or a %s property",
          URI_TEMPLATE_PROPERTY
      );
    }
    if (hasUri && !hasFormat) {
      throw new IAE(
          "An external HTTP table with a URI must also provide the corresponding format"
      );
    }
    if (hasUri && !hasColumns) {
      throw new IAE(
          "An external HTTP table with a URI must also provide the corresponding columns"

View on GitHub (pinned to 9b90983fd2)

Solutions

  1. Set the 'uris' field on the HTTP input source, e.g. ["https://example.com/data.json"]
  2. Alternatively set the uriTemplate property on the table for parameterized URLs
  3. Re-check the table definition JSON to confirm the address field survived serialization

Example fix

// before
{"type": "http"}
// after
{"type": "http", "uris": ["https://example.com/data.json"]}
Defensive patterns

Strategy: validation

Validate before calling

boolean ok = inputSource.getUris() != null && !inputSource.getUris().isEmpty() || tableProps.containsKey("uriTemplate");

Prevention

When it happens

Trigger: Validating a catalog HTTP external table where the resolved table has no 'uris' field in its input source map and no uriTemplate table property set.

Common situations: Creating an external HTTP table spec and forgetting to fill in the address entirely; copying a template-based table definition and deleting both the template and URI fields; programmatic table construction that skipped the location property.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


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