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

[Bug] JSONata cannot convert hexadecimal to decimal #1038

Open
Hulumulula opened this issue Sep 19, 2024 · 1 comment
Open

[Bug] JSONata cannot convert hexadecimal to decimal #1038

Hulumulula opened this issue Sep 19, 2024 · 1 comment
Labels
datasource/Infinity type/bug Something isn't working

Comments

@Hulumulula
Copy link

What happened?

I am trying to set up Alerting with Infinity.
When I query an external api, I get hex values back to me

Here is an example of the data I get:

{ "result":"0x13d254b"}

Next I am trying to convert this value to decimal:
$number( $formatBase( $number($.result), 10 ) )

But I get an error:

Failed to evaluate queries and expressions: failed to execute query A: error getting data frame from inline data. root object doesn't exist in the response. Root selector:( ${"r": $number( $formatBase( $number($.result), 10 ) ) } )

If I change the result value to a numeric type, everything works immediately.

What did you expect to happen?

The conversion should succeed from hexadecimal to decimal.

Did this work before?

I don't know

How do we reproduce it?

Is the bug inside a dashboard panel?

No response

Environment (with versions)?

Grafana: Grafana v9.5.15

Grafana platform?

I don't know

Datasource(s)?

Infinity

@grafana-issues-bot grafana-issues-bot bot added the type/bug Something isn't working label Sep 19, 2024
@yesoreyeram yesoreyeram transferred this issue from grafana/grafana Oct 31, 2024
@yesoreyeram yesoreyeram removed this from Alerting Oct 31, 2024
@yesoreyeram yesoreyeram moved this to Backlog in OSS Big Tent Oct 31, 2024
@yesoreyeram
Copy link
Collaborator

Seems to be an issue with the underlying JSONata library. xiatechs/jsonata-go#37

@yesoreyeram yesoreyeram changed the title Alerting: JSONata cannot convert hexadecimal to decimal JSONata cannot convert hexadecimal to decimal Oct 31, 2024
@yesoreyeram yesoreyeram changed the title JSONata cannot convert hexadecimal to decimal [Bug] JSONata cannot convert hexadecimal to decimal Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datasource/Infinity type/bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants