apache / apache/iotdb

[Bug] Grafana Plugin - variables not accepted in SQL "Drop Down List" query editor

Open
#13,960 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.4k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
115

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.

### Version

IoTDB v1.3.2 in docker on MacOS

### Describe the bug and provide the minimal reproduce step

A variable for a device path has been created as per instructions.
This variable can be used successfully in the "SQL Full-Customized" query editor

As per the excellent documentation [1]

> Both SQL: Full Customized and *SQL: Drop-down List* input methods support the variable and template functions of grafana

However, trying to add the sensor path at the dropdown element shown as `"$endpoint"` below ...

[root] > [dropdown-sg] > "$endpoint"

... I get the following error:

> $endpoint is illegal, unquoted node name can only consist of digits, characters and underscore, or start or end with wildcard

Note: I have tried `$endpoint` `${endpoint}` and `{{endpoint}}` form of variable template syntax.

[1]: https://iotdb.apache.org/UserGuide/latest/Ecosystem-Integration/Grafana-Plugin.html#create-a-new-panel

### What did you expect to see?

Variable template syntax shown in path element instead of regular path component from dropdown

### What did you see instead?

Error

### Anything else?

I notice the source repo for the grafana plugin (iotdb-extras) does not have any issues tracked. I can re-submit there if required.

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in the Grafana plugin's SQL Drop-down List editor with IoTDB v1.3.2, comparing it with the SQL Full-Customized editor. Then inspect the plugin source in iotdb-extras and the linked Grafana plugin documentation. Done means a device-path variable is accepted in the dropdown editor instead of being parsed as an illegal literal path node.

Written by the indexing model from the issue text.

Assessment

Tech stack
grafana, sql
Domain
databases, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.