Connecting AWS Athena to Preset.io

Albert Wong
2 min readNov 14, 2024

--

You would think that https://docs.preset.io/docs/aws-athena is enough to get it working, but it’s not.

Question: When I try to connect to Preset.io, I get a database creation error when trying to connect to an Athena database. However, I’m only trying to connect. I don’t understand why it’s trying to create a database.

Answer: Bad UI. The issue is display name. it can’t be the same name of an existing database entry (pick Amazon Athena2 or any other name). Someone should fix that bad error message.

Question: What does staging directory mean?

Answer: Athena stores results in a S3 bucket. This shouldn’t be where you store your table data but a temp space.

Question: What AWS role or policy do I need to connect Preset.io or Apache Superset to AWS Athena?

Answer: I couldn’t get any aws policy to work other than AmazonAthenaFullAccess

Question: What does a good working URI for preset or superset for AWS Athena look like?

Answer: awsathena+pandas://AKIAZQ3DO4K45DKD7RT5:ASDFASDFASDFASDF@athena.us-west-2.amazonaws.com/onehouse_demo?s3_staging_dir=s3://oh-project-ajax-athena/&work_group=primary

--

--

Albert Wong
Albert Wong

Written by Albert Wong

#eCommerce #Java #Database #k8s #Automation. Hobbies: #BoardGames #Comics #Skeet #VideoGames #Pinball #Magic #YelpElite #Travel #Candy

No responses yet