Skip to content

RedisJSON path fails to display non-string data #283

@willtoth

Description

@willtoth

Describe the bug

When pulling data from a RedisJSON data source using GET with a path, I can get data that is represented as a string, but not numeric data.

For example, on the command line I can run these queries:

127.0.0.1:6379> JSON.GET statbotics:matches:2022txfor_qm20 $.event "[\"2022txfor\"]" 127.0.0.1:6379> JSON.GET statbotics:matches:2022txfor_qm20 $.year "[2022]" 

When I try these same queries in grafana I get the following results. First with the event key, which works as expected:

image

Next with the year key. You can see that it does not fail, as a failed query shows an error, however there is no data shown.

image

Version

2.1.1

Steps to reproduce

  1. Attempt to pull a RedisJSON field using JSON.GET on a path where the data is represented as a numeric value.

Additional context

Storing everything as a string instead technically works, but requires transformations, which makes things messier, especially since most queries are going to be on numeric values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions