grafana / timestream-datasource

Amazon Timestream in Grafana
https://grafana.com/grafana/plugins/grafana-timestream-datasource
Apache License 2.0
24 stars 19 forks source link

database or table names with '-' character cause problems with the query builder #23

Closed simonc6372 closed 3 years ago

simonc6372 commented 3 years ago

If the database of table names have a '-' character, then the table and measure macro fields are not populated in the query builder.

What happened? When selecting a table for a Timestream database from the table macro the list is empty, but if the table name is known it can be added manually which works, same for the measure macro field. See attached screenshots.

What was expected to happen? The table and measure macro fields to be populated with available tables and measures.

Steps to reproduce the problem:

  1. Create Timestream Database, Table, add data, create IAM User with access
  2. Add Timestream Data Source to Grafana
  3. Create new panel, select Timestream Data Source
  4. Select database from macro drop down
  5. Try to select table macro, which contains an empty list.

Version numbers (grafana, prometheus, graphite, plugins, operating system, etc.):

  1. Grafana Cloud - Grafana v7.3.2 (b8ad4eaab3)
  2. Amazon Timestream v.1.0.0, installed on November 5, 2020

Configuration information: The IAM user whose credentials are used in the Timestream Data Source has timestream:* allow permissions.

gabecazares-cc commented 3 years ago

Same issue happening to me. Kudos for finding the issue, @simonc6372 ! I created new DBs and tables without dashes and they're now showing up in Grafana =)

edit: Tables without dashes seems to work with databases that have dashes in their name. So it might just be table names that don't work with dashes.

edit: Disregard edit; I can see dashless tables in dashes databases in the datasource configuration, but not in a dashboard/query editor.

simonc6372 commented 3 years ago

I can't take credit for finding it, but I will pass it along.

ryantxu commented 3 years ago

databases names need quotes around them if they have special characters. The latest release 1.1.0 will suggest quotes around everything. If it is still an issue once quoted, let me know