-
What Grafana version and what operating system are you using? V11.1
-
What are you trying to achieve?
-
My timeseries legend shows two versions of my data. One as a bigint and the other as a double. The bigint is zero and the double shows the actual value. I would like to remove the bigint from the legend as it is duplicating the series name.
-
Can you copy/paste the configuration(s) that you are having problems with?
This is my query
SELECT * FROM $__database.$__table WHERE ‘TOT_P’ = “measure_name” -
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were. There are no errors
is this mysql or postgres?
what do you see when you click on Query Inspector?
Hi, this is a timestream db from aws.
Here is the query data from the Query Inspector.
Object
traceId:“af1c27a54104b49731ca757d41c448a5”
request:Object
url:“api/ds/query?ds_type=grafana-timestream-datasource&requestId=aws_ts_4902.8”
method:“POST”
data:Object
queries:Array[1]
from:“1721795287986”
to:“1721798887987”
hideFromInspector:false
response:Object
results:Object
B:Object
status:200
frames:Array[1]
0:Object
schema:Object
refId:“B”
meta:Object
fields:Array[5]
0:Object
name:“SOURCE”
type:“string”
typeInfo:Object
1:Object
name:“measure_name”
type:“string”
typeInfo:Object
2:Object
name:“time”
type:“time”
typeInfo:Object
3:Object
name:“measure_value::double”
type:“number”
typeInfo:Object
4:Object
name:“measure_value::bigint”
type:“number”
typeInfo:Object
data:Object
sorry meqnt to say the query generated not the data generated
Hi Yosiasz, thanks for your help.
The query is
SELECT * FROM $__database.$__table WHERE ‘TOT_P’ = “measure_name”
I don’t know how to select only the ‘double’ datatype as I can’t find any examples of this with the timestream sql dialect.
the query generated in query inspector
This is the raw query from the Query Inspector
rawQuery:“SELECT * FROM "IoTIntrolab"."GRID_DATA" WHERE ‘TOT_P’ = "measure_name"”
rawQuery:“SELECT * FROM "IoTIntrolab"."GRID_DATA" WHERE ‘TOT_P’ = "measure_name"”
rawQuery:“SELECT * FROM "IoTIntrolab"."GRID_DATA" WHERE ‘TOT_P’ = "measure_name"”
Sorry, it was removing the back slashes
so what data do you get when running that raw query you pasted, outside of grafana directly in a query tool provided by your aws timestream
When I created the table on AWS, you cannot choose which columns to add. This is just automatically generated when you start posting data to it. I can see now that there is one field which is represented as a bigint, the rest are all doubles. Which may be the start of the problem. But I don’t know how to tell Timestream not to use bigint. When I run a query inside AWS I get the columns with double and bigint. See attached image called ‘all rows’.
Because I can’t seem to avoid getting a whole column for bigint, is there not a way that I can just remove that field using the query inside grafana to only select ‘double’. Thanks
Uploading: all rows.png…
how about using Transformation and then Organize Fields and then click on :eye icon to disable bigint?