dacort / metabase-athena-driver

An Amazon Athena driver for Metabase 0.32 and later
Apache License 2.0
225 stars 32 forks source link

How to query Databases/Tables from a catalog different from the default one (AwsDefaultCatalog) #94

Closed shlsheth263 closed 2 years ago

shlsheth263 commented 2 years ago

On athena this query is working: SELECT * FROM "wi-cloudwatch-logs"."/aws-glue/crawlers"."wi_test" limit 10

where wi-cloudwatch-logs is a catalog.

On Metabase this query is giving error:

[Simba]AthenaJDBC An error has been thrown from the AWS Athena client. Amazon Athena experienced a permission error. Please provide proper permission and submitting the query again. If the issue reoccurs, contact AWS support for further assistance. You will not be charged for this query. We apologize for the inconvenience. [Execution ID: 76ba8e62-186c-4538-9b96-52c75fe7d8af]

Additional Athena connection string options : Catalog=wi-cloudwatch-logs

shlsheth263 commented 2 years ago

@dacort Pls look into it

dacort commented 2 years ago

You should be able to write raw SQL queries in Metabase using the same syntax.

The error message seems to indicate that whatever IAM credentials you're using to connect to Athena with Metabase don't have the proper permissions. Can you validate that?

dacort commented 2 years ago

I've been trying to get this to work by using the Catalog and MetadataRetrievalMethod properties in the additional connection options, but it doesn't seem to work. I think a rewrite of how this connector fetches databases/tables is necessary in order to properly support this, which I don't currently have the bandwidth for. :(

For reference, these were the extra parameters: MetadataRetrievalMethod=ProxyAPI;Catalog=other_data_catalog

dacort commented 2 years ago

Closing this one in preference of the older #49