grafana / athena-datasource

Apache License 2.0
38 stars 13 forks source link

Configuration editor: Except for the generic authentication options, the user will have to specify a catalog (datasource) and a database in input fields. These will be used to verify that the IAM role/user has permissions to access the Athena API:s. #4

Closed sarahzinger closed 3 years ago

sunker commented 3 years ago

I believe we should be able to use the ListTableMetadata endpoint to verify that the right permissions exist. aws athena list-table-metadata --database cloud-datasources-db --catalog-name AwsDataCatalog

sunker commented 3 years ago

The region, catalog and database that is specified in the configuration page should be considered the default values. I.e, that's the values that we would pass to the driver when a new connection is opened (done here for Redshift).

When region, catalog and database is changed in the query editor (a different value than the default values), we should not open a new connection to the driver but instead pass these as args to the driver query function. This is not something that should be done in this PR, but just so you know. See this feature request in sqlds for reference.

andresmgot commented 3 years ago

When region, catalog and database is changed in the query editor (a different value than the default values), we should not open a new connection to the driver but instead pass these as args to the driver query function. This is not something that should be done in this PR, but just so you know. See this feature request in sqlds for reference.

for reference, this will be tracked at https://github.com/grafana/athena-datasource/issues/7