MeltanoLabs / target-athena

Singer.io Target for AWS Athena.
Other
5 stars 16 forks source link

Athena database creation #11

Closed andrewcstewart closed 3 years ago

andrewcstewart commented 3 years ago

https://docs.aws.amazon.com/athena/latest/ug/creating-databases.html

Open question here. Normally db creation seems to be handled outside of targets. It could make sense for this target to just create a db though.

aaronsteers commented 3 years ago

This should be working: https://github.com/dataops-tk/target-athena/commit/c0a6c3d64609478f488279775a32f0316bc9b264

Before each load, the target should send "CREATE DATABASE IF NOT EXISTS...".

Let me know if you find otherwise or if it isn't working.

aaronsteers commented 3 years ago

Also, per the documentation here, schemas and databases are apparently basically the same thing in athena-land.

CREATE DATABASE

Creates a database. The use of DATABASE and SCHEMA is interchangeable. They mean the same thing.