apache/druid · error · IAE
An inline table requires one or more rows of data in the '%s
Error message
An inline table requires one or more rows of data in the '%s' property
What it means
When converting user args to an inline input source JSON map, InlineInputSourceDefn.convertArgsToSourceMap requires at least one row of data in the 'data' property. The underlying Druid InlineInputSource does not support zero rows, so an empty data list is rejected. Thrown as IllegalArgumentException.
Source
Thrown at server/src/main/java/org/apache/druid/catalog/model/table/InlineInputSourceDefn.java:98
throw new IAE("An inline input source must provide a format.");
}
if (CollectionUtils.isNullOrEmpty(table.resolvedTable().spec().columns())) {
throw new IAE("An inline input source must provide one or more columns");
}
super.validate(table);
}
@Override
protected void convertArgsToSourceMap(Map<String, Object> jsonMap, Map<String, Object> args)
{
jsonMap.put(InputSource.TYPE_PROPERTY, InlineInputSource.TYPE_KEY);
List<String> data = CatalogUtils.getStringArray(args, DATA_PROPERTY);
// Would be nice, from a completeness perspective, for the inline data
// source to allow zero rows of data. However, such is not the case.
if (CollectionUtils.isNullOrEmpty(data)) {
throw new IAE(
"An inline table requires one or more rows of data in the '%s' property",
DATA_PROPERTY
);
}
jsonMap.put(DATA_FIELD, String.join("\n", data));
}
@Override
protected ExternalTableSpec convertCompletedTable(
final ResolvedExternalTable table,
final Map<String, Object> args,
final List<ColumnSpec> columns
)
{
if (!args.isEmpty()) {
throw new ISE("Cannot provide arguments for an inline table");
}
if (!CollectionUtils.isNullOrEmpty(columns)) {View on GitHub (pinned to 9b90983fd2)
Solutions
- Provide one or more rows in the 'data' property (each list element becomes a line)
- If no data exists yet, use a different input source type or defer table creation
- Check the code path generating the data list for empty-result handling
Example fix
// before
args: {"data":[]}
// after
args: {"data":["1,foo","2,bar"]} Defensive patterns
Strategy: validation
Validate before calling
List<String> data = (List<String>) args.get("data");
if (data == null || data.isEmpty()) {
throw new IllegalArgumentException("inline table requires non-empty 'data' property");
} Try / catch
try { defn.convertArgsToSourceMap(args); } catch (IAE e) { if (e.getMessage().contains("one or more rows of data")) { /* supply data rows */ } else { throw e; } } Prevention
- Check upstream data population steps for empty results before creating the table
- Do not create inline tables as placeholders with no rows
- Default-template inline tables should include sample data
When it happens
Trigger: Calling convertArgsToSourceMap with args whose DATA_PROPERTY ('data') string array is missing, null, or empty.
Common situations: Template renders with no data rows; user saves an inline table intending to add data later; an upstream step that was supposed to populate data produced an empty list.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- An inline input source must provide a format.
- An inline input source must provide one or more columns
- '%s' must be a string or an array of strings
- S3 requires one of %s, %s or %s
- When using the %s parameter, %s must also be provided
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/46d73fc1b7544217.
Report an issue: GitHub.