grafana-infinity-datasource icon indicating copy to clipboard operation
grafana-infinity-datasource copied to clipboard

[Bug] Error when using capital letters in Summarize function of Json Backend Parser

Open imReker opened this issue 1 year ago • 6 comments

Screenshots

image

image

imReker avatar Oct 12 '22 05:10 imReker

Actually that was intentional... Docs are due to update.. sorry you had trouble and glad you figured out..

BTW, curious to see if any other issues with the summarize function.

I will leave this issue open till the docs updated.

yesoreyeram avatar Oct 12 '22 07:10 yesoreyeram

Also special characters and space are supposed to be replaced with underscore.

yesoreyeram avatar Oct 12 '22 07:10 yesoreyeram

Actually docs have slightly touched this already

Screenshot_20221012-084450

yesoreyeram avatar Oct 12 '22 07:10 yesoreyeram

Thanks for reply. I think this behavior is some kind of inconvenience. For example, if the column title is Chinese: image

imReker avatar Oct 12 '22 07:10 imReker

Yea.. that's a pain.. let me try to find a solution.

yesoreyeram avatar Oct 12 '22 08:10 yesoreyeram

${column name} is better? Or something like %column name% to avoid confuse with Grafana variable gramma?

imReker avatar Oct 12 '22 08:10 imReker

Ok.. this is now solved I guess.. refer backed parser docs on how to use it.

Example:

When specifying the field name, all special characters must be replaced with - and also transformed to lower case. Or the field name can also be specified within square brackets if they contain special characters. For example if the field name is Something Else!, then that can be specified like min(something-else-) or min([Something Else!]).

yesoreyeram avatar Nov 24 '22 10:11 yesoreyeram

In summary, use square brackets around the field name

yesoreyeram avatar Nov 24 '22 10:11 yesoreyeram

Thank you for your amazing work! @yesoreyeram

imReker avatar Nov 24 '22 11:11 imReker