[influxdb] Fix query for InfluxDB2 (#14542)
Signed-off-by: Jan N. Klug <github@klug.nrw>pull/13355/head
parent
c7f7dbdc07
commit
6da85a4757
|
@ -165,6 +165,9 @@ public class InfluxDB2RepositoryImpl implements InfluxDBRepository {
|
||||||
private Stream<InfluxRow> mapRawResultToHistoric(FluxTable rawRow) {
|
private Stream<InfluxRow> mapRawResultToHistoric(FluxTable rawRow) {
|
||||||
return rawRow.getRecords().stream().map(r -> {
|
return rawRow.getRecords().stream().map(r -> {
|
||||||
String itemName = (String) r.getValueByKey(InfluxDBConstants.TAG_ITEM_NAME);
|
String itemName = (String) r.getValueByKey(InfluxDBConstants.TAG_ITEM_NAME);
|
||||||
|
if (itemName == null) {
|
||||||
|
itemName = r.getMeasurement();
|
||||||
|
}
|
||||||
Object value = r.getValueByKey(COLUMN_VALUE_NAME_V2);
|
Object value = r.getValueByKey(COLUMN_VALUE_NAME_V2);
|
||||||
Instant time = (Instant) r.getValueByKey(COLUMN_TIME_NAME_V2);
|
Instant time = (Instant) r.getValueByKey(COLUMN_TIME_NAME_V2);
|
||||||
return new InfluxRow(time, itemName, value);
|
return new InfluxRow(time, itemName, value);
|
||||||
|
|
Loading…
Reference in New Issue