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

WTF - String column truncated as int value #516

Closed
cdeil opened this issue Nov 16, 2022 · 2 comments
Closed

WTF - String column truncated as int value #516

cdeil opened this issue Nov 16, 2022 · 2 comments
Labels

Comments

@cdeil
Copy link
Contributor

cdeil commented Nov 16, 2022

What happened:

Am ADX query with "Table" format with a column "SiteID" that is of ADX type "string" and has value "0575" was displayed incorrectly as value "575".

It looks like a bug where the string column is processed as in integer and the leading zero "0" is dropped!?

What you expected to happen:

Value shown in table should be string "0575".

Grafana ADX plugin should respect ADX column data types and not treat strings as ints.

How to reproduce it (as minimally and precisely as possible):

Create ADX table with this schema:

.create table Plant_Metric_0575 (DateTime: datetime, Value: real, SensorTag: string, SiteId: string) 

Insert this row:

"DateTime": 2022-11-16T08:08:02Z,
"Value": 5,
"SensorTag": 01KB556,
"SiteId": 0575

Table will be shown correctly in ADX, but incorrectly in Grafana.

Screenshots

Screenshot 2022-11-16 at 19 49 53

Anything else we need to know?:

Environment:

  • Grafana version: v7.3.4
  • Plugin version: don't know
  • OS Grafana is installed on:
  • User OS & Browser:
  • Others:
@cdeil cdeil added datasource/ADX type/bug Something isn't working labels Nov 16, 2022
@aangelisc
Copy link
Contributor

Hi @cdeil,

I've tested this in the most recent version of the ADX plugin using Grafana v9.2.6 and the values are parsed correctly. Can you test this on a more recent version of Grafana and identify which ADX version you're using please?

@cdeil
Copy link
Contributor Author

cdeil commented Nov 23, 2022

I don't have an easy way to use a recent version of Grafana. Our company will likely update next year.

Let's then just close this and assume it's fixed.

@aangelisc - thank you for testing on a recent version!

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

No branches or pull requests

2 participants