Query data from json

I am using apache flink which has build-in metrics and send latency metrics to influx.
In flink latency implemented as a Gauge and looks like
> “values”: [

        [
          "2017-08-22T19:01:13.25Z",
          "rpds",
          "{LatencySourceDescriptor{vertexID=1, subtaskIndex=1}={p99=24.0, p50=4.0, min=1.0, max=24.0, p95=24.0, mean=7.6}}"
        ],
        [
          "2017-08-22T19:01:23.947Z",
          "rpds",
          "{LatencySourceDescriptor{vertexID=1, subtaskIndex=1}={p99=24.0, p50=3.0, min=1.0, max=24.0, p95=24.0, mean=5.375}}"
        ],

It is any way to query percentiles values with influx from json like this? I didn’t find any substring function.

Hi @Georgy_Gobozov,

I’m not sure I understand the question correctly but if the latency metrics are being written to InfluxDB, then you can write queries for percentiles. You’ll find the PERCENTILE function documented here.

I think @Georgy_Gobozov wanted to extract the percentile values, e.g. p99, p50 and p95 from the JSON.

In that case, no, this isn’t possible at the InfluxDB-level, as it doesn’t support parsing JSON or any string functions.