Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis and Grafan: JSONPath not returning JSON object correctly #290

Open
willychrisza opened this issue Mar 13, 2023 · 4 comments
Open

Redis and Grafan: JSONPath not returning JSON object correctly #290

willychrisza opened this issue Mar 13, 2023 · 4 comments

Comments

@willychrisza
Copy link

Summary

After adding Redis as a data source in Grafana I'm trying to query a JSON object. The JSONPath query does not return the data expected.. For instance if I use *.* or .* or $.* the response only contains the first item, rather than what was requested. which is everything. Is this is a bug or does the Redis query for JSON vary from JSONPath?

For context, I'm trying to create a table from a Redis JSON object in Grafana. Thanks for any advice in advance.

Relevant information

@aengusrooneygrafana
Copy link

Hi @mikhail-vl is this an issue we could collaborate on?

@mikhail-vl
Copy link
Contributor

@aengusrooneygrafana Please contact the Redis team @K-Jo.

@chavalikesavanand
Copy link

@aengusrooneygrafana any updates on this pls

@slorello89
Copy link
Contributor

Hi @willychrisza - curious if this is related to #283 - are you actually using the JSON data type? or are you are saving strings in redis and pulling out certain paths client side (not certain from the way the issue is phrased) - I've found that it appears that JSON operations (e.g. JSON.GET) only seem to work with clean scalar strings, or objects that will break down somewhat nicely.

Curious what your thoughts are on how a result would look if one of these paths were used. JSON is by its nature schemaless so mapping it into the tabular format that the grafana frames expect is at least somewhat problematic. I've opened a PR to fix the issue with other scalars (booleans and numbers) but will need some more time to consider what this will look like for non-scalars (arrays/complex-nested objects).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants