diff --git a/examples/src/main/java/com/influxdb/v3/IOxExample.java b/examples/src/main/java/com/influxdb/v3/IOxExample.java index 147baeb..aec4171 100644 --- a/examples/src/main/java/com/influxdb/v3/IOxExample.java +++ b/examples/src/main/java/com/influxdb/v3/IOxExample.java @@ -23,6 +23,7 @@ import java.time.Instant; import java.time.LocalDateTime; +import java.util.Arrays; import java.util.stream.Stream; import com.influxdb.v3.client.InfluxDBClient; @@ -100,8 +101,8 @@ public static void main(final String[] args) throws Exception { try (Stream stream = client.queryPoints(sql)) { stream.forEach( (PointValues p) -> { - var time = p.getField("time", LocalDateTime.class); - var location = p.getField("location", String.class); + var time = p.getTimestamp(); + var location = p.getTag("location"); var value = p.getField("value", Double.class); System.out.printf("| %-8s | %-8s | %-30s |%n", location, value, time);