-
Notifications
You must be signed in to change notification settings - Fork 121
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
for Table pluggin, fields that are not Integer are typed as string #199
Comments
Dear @Stephane-Thales, could you help me reproduce issue? I tried to reproduce with following steps:
run following queries inside clickhouse-client
open grafana at
|
Hi @Slach , for reference, i'm using
to reproduce my issue I've used the same table than you :
then New dashboard, new pannel
in clickhouse 👍
Note the change of option "Cell display mode" to "Color text" for visualisation of the text vs number. The data is well provided as float by clickhouse, with the decimals But Grafana think it's string If I change the query to that :
Then the fiel is recognized as a number (color coding is applied): Thanks. |
I have pulled the latest master but this is not fixed for me
still thinks these Float64-based cols are strings. |
@mzealey could you share SHOW CREATE TABLE cloudlinux_faults? |
|
latest grafana docker image so 7-series |
did you try to redefine decimals in "Field" tab for in Average and Maximum columns? |
I am not sure what you mean by this? |
Ah yes then they work as numbers. Is there no way to do this automatically in the plugin ? |
look like it's a not a plugin scope |
# 2.0.2 (2020-07-07) ## Enhancements: * add alerts support for Windows and MacOSX * improve ad-hoc filters for query field values as `SELECT DISTINCT field AS value FROM db.table LIMIT 300`, Altinity/clickhouse-grafana#222 * add the ability to multiple JOIN parsing Altinity/clickhouse-grafana#206 * multiple improvements for docker-compose environments, add automatic dashboards and data source provisions which help to reproduce most of the corner cases which happens in Grafana + ClickHouse ## Fixes: * apply a workaround for UTC timezone for Date and DateTime columns in grafana dashboards Altinity/clickhouse-grafana#117 * clear documentation about timestamp term for $from and $to Altinity/clickhouse-grafana#115 * fix AST parsing corner case in `WHERE [test, 'test']` "," was skipped, fix ah-doc AST FROM recursive parsing Altinity/clickhouse-grafana#99 * fix corner cases for table functions parsing when Adhoc filter applied Altinity/clickhouse-grafana#130 * fix multiple grammar issues in README.md * fix convert rules for Float, Decimal columns from Clickhouse to Grafana Table plugin Altinity/clickhouse-grafana#199 * fix corner cases when Grafana Template variable value represented as an array of strings Altinity/clickhouse-grafana#169 * fix AST parsing corner cases for $macroFunctions correct position for FROM statement Altinity/clickhouse-grafana#187 Signed-off-by: Eugene Klimov <[email protected]>
Hi all,
Only for the Table plugin (so far it work with the Stat object)
With a query format as Table (not Time series)
If a clickhouse Field is Nullable(Float64), Float64, Decimal ... it's typed as String.
So the plugin can't be configured to apply numeric related formatting (%, Threshold ...)
To check, compare types between
Workaround is to apply in the query a
toInt16(ifNull( MyField ,0)) as MyField
But that prevent to display decimals.
Is that a Table plugin issue or a clickhouse-grafana plugin issue ?
Can that be fixed in clickhouse-grafana plugin ?
thanks
The text was updated successfully, but these errors were encountered: