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

Let user configure default tables and database macros #258

Closed
sarahzinger opened this issue Nov 7, 2023 · 2 comments
Closed

Let user configure default tables and database macros #258

sarahzinger opened this issue Nov 7, 2023 · 2 comments

Comments

@sarahzinger
Copy link
Member

Discussed in https://github.com/grafana/timestream-datasource/discussions/204

Originally posted by baxterjo November 17, 2022

Problem

The title of this issue alludes to my proposed solution a bit. But I would like to provide the "why" here incase anyone has a better idea of how to implement what I am trying to do.

I currently have several, identical data sources across a few AWS accounts. The names of the databases and tables in these accounts are created by an application stack deployment process and are not identical, but the data in the tables are identical. In my existing Grafana instance, I have one dashboard per data source and all of the dashboards are identical as well. The problem is that when I make a change to one dashboard, I then have to go through and make that change to all dashboards.

What I have Tried

I tried making the data source a variable in the dashboard, but the macros associated with $__table and $__database in the datasource are overwritten on the left side of the query editor when editing a panel. So when I swap the data source on the environment variable dropdown menu, all of the queries break because they are looking for the wrong databases and tables.

Potential Engineering Solution

When writing a query for an Amazon Timestream resource there are three Macro dropdowns on the left side of the query block. I would like to add an explicit use_datasource_default option to those dropdowns to allow for easy switching between datasources on the same dashboard.

OR

Create new macros for the plugin such as $__source_default_database, $__source_default_table, and $__source_default_measure

@sarahzinger
Copy link
Member Author

@baxterjo I moved your discussion to an issue for our backlog! Another thing to try could be to create variables that are hard-coded table names/database names, I think that should work? Although I haven't actually tested.

Still I think it's a reasonable feature request to want a default table/default database macro

@github-project-automation github-project-automation bot moved this to Incoming in AWS Datasources Nov 7, 2023
@sarahzinger sarahzinger added the type/feature-request New feature or request label Nov 7, 2023
@sarahzinger sarahzinger moved this from Incoming to Backlog in AWS Datasources Nov 7, 2023
@kevinwcyu kevinwcyu moved this from Backlog to Feature requests in AWS Datasources Nov 17, 2023
@kevinwcyu kevinwcyu moved this from Icebox to Backlog in AWS Datasources Nov 17, 2023
@katebrenner
Copy link
Contributor

I hope @sarahzinger workaround worked for you! Closing as this is not on our immediate roadmap

@github-project-automation github-project-automation bot moved this from Backlog to Done in AWS Datasources Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants