Can I Create Table in AWS Athena with SQL Alchemy ORM?

0

I have been made to understand that Athena is different from normal SQL as it basically reads and queries data from an s3 backend. However, I am very much used to the SQL Alchemy ORM interface for querying databases as well as upserting data, creating tables etc. I already tried querying my company athena database with pyathena and it is working fine. However, does creating table work the same way as in other MySQL databases (such as RDS), so that I can reflect the existing tables and create a new one using my python code? Or is there some athena specific pitfall I should be aware of?

asked 4 months ago318 views
1 Answer
0

Hello There,

Thank you for your query.

I understand that you would like to understand if you can use SQL Alchemy ORM to access your existing existing tables and create new ones through Athena using Python code.

I had a look internally and also on the external articles and could understand that using SQL Alchemy ORM to access tables or create new tables, reading data or deleting data is possible using python code. There is no known issues on the same. One such discussion can be found on this re-post article [1].

However, in case you would like to replicate this use case with us or are coming across any particular errors, I would request you to create support case with Athena Premium Support team and we will be glad to assist further with it.

Please feel free to get back to me, in case you have any further query on this.

[1] https://repost.aws/questions/QUTuN0Pf86QCCL-d3mtQvBaA/is-it-possible-delete-table-or-rows-from-table-using-amazon-athena

[2] https://medium.com/codex/connecting-to-aws-athena-databases-using-python-4a9194427638

profile pictureAWS
SUPPORT ENGINEER
Rajiv_M
answered 4 months ago
profile picture
EXPERT
reviewed 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions