apache/seatunnel · warning
InfluxDB query returned no series (empty data), using defaul
Error message
InfluxDB query returned no series (empty data), using default column index mapping.
What it means
Same fallback path as the empty-results warning, but this one fires when the query returned results whose first Result contains no Series — i.e. the database responded but has no data/columns for the query. The connector logs this warning and uses buildDefaultColumnsIndex(), which may misalign field indexes with the real measurement schema.
Source
Thrown at seatunnel-connectors-v2/connector-influxdb/src/main/java/org/apache/seatunnel/connectors/seatunnel/influxdb/source/InfluxDBSource.java:126
if (start > 0) {
StringBuilder tmpSql = new StringBuilder(sql);
tmpSql.insert(start - 1, QUERY_LIMIT).append(" ");
query = tmpSql.toString();
}
try {
QueryResult queryResult = influxdb.query(new Query(query, sourceConfig.getDatabase()));
List<QueryResult.Result> results = queryResult.getResults();
if (CollectionUtils.isEmpty(results)) {
log.warn(
"InfluxDB query returned empty results, using default column index mapping.");
return buildDefaultColumnsIndex();
}
List<QueryResult.Series> serieList = results.get(0).getSeries();
if (CollectionUtils.isEmpty(serieList)) {
log.warn(
"InfluxDB query returned no series (empty data), using default column index mapping.");
return buildDefaultColumnsIndex();
}
List<String> fieldNames = new ArrayList<>(serieList.get(0).getColumns());
return Arrays.stream(catalogTable.getSeaTunnelRowType().getFieldNames())
.map(fieldNames::indexOf)
.collect(Collectors.toList());
} catch (Exception e) {
throw new InfluxdbConnectorException(
InfluxdbConnectorErrorCode.GET_COLUMN_INDEX_FAILED,
"Get column index of query result exception",
e);
}
}
/**View on GitHub (pinned to cf67b549a7)
Solutions
- Confirm the measurement has data for the query's time range/filters using the influx CLI
- Remove or widen time-range/WHERE filters in the connector query so metadata discovery returns series
- Verify measurement name casing matches exactly (InfluxDB measurement names are case-sensitive)
- If discovery keeps failing, explicitly configure the SeaTunnel schema (fields and types) instead of relying on automatic index mapping
Example fix
// before query = "SELECT * FROM cpu WHERE time > now() - 1s" // too narrow, no points // after query = "SELECT * FROM cpu WHERE time > now() - 1h"
Defensive patterns
Strategy: validation
Validate before calling
QueryResult qr = influxdb.query(new Query(query, database));
boolean hasSeries = qr.getResults() != null && !qr.getResults().isEmpty()
&& qr.getResults().get(0).getSeries() != null && !qr.getResults().get(0).getSeries().isEmpty();
if (!hasSeries) throw new IllegalStateException("Query returned no series: " + query); Prevention
- Widen time ranges / relax WHERE filters used for schema discovery
- Check measurement name casing matches exactly
- Ensure data ingestion has run before starting the source
- Configure the schema explicitly if discovery is unreliable
When it happens
Trigger: initColumnsIndex: results non-empty but results.get(0).getSeries() is null/empty — query matched a database/measurement with no points, or a query filtering out all data (e.g. WHERE clause, time range).
Common situations: Time-range or WHERE filters excluding all points; writing to a measurement that was never populated; case-sensitive measurement name mismatch; querying before any data ingestion ran.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- InfluxDB query returned empty results, using default column
- TABLE_NOT_EXISTED
- GET_COLUMN_INDEX_FAILED
- UNSUPPORTED_OPERATION
- CONNECT_FAILED
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/4da32f631493b075.
Report an issue: GitHub.