MeltanoLabs / target-athena

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

Should the target optionally create an athena catalog ? #20

Closed andrewcstewart closed 2 years ago

andrewcstewart commented 3 years ago

In Athena parlance, catalog is basically analogous to database and database is analogous to schema. We are currently creating the "schema" if it doesn't exist, but should we also potentially create a catalog?

andrewcstewart commented 3 years ago

Some more info: https://docs.aws.amazon.com/cli/latest/reference/athena/create-data-catalog.html

aaronsteers commented 3 years ago

@andrewcstewart - For my part, if it's feasible to do so, I like the idea of "no setup required" and the target can auto-create its own environment.

The reverse argument, I think, is that you might not want to accidentally create a new catalog, for instance if the user accidentally sets the wrong region (true story 😆 ). This could be optionally be mitigated by (and perhaps in a future update) a setting value of allow_create_catalog or similar.

andrewcstewart commented 3 years ago

That seems reasonable. Another thought is that because the default awsdatacatalog catalog already exists for accounts, we could simply use the setting of any other value of a athena_catalog config param as inidiication to create if not exists.

andrewcstewart commented 3 years ago

On second thought, it looks like creating additional catalogs for Athena is not at all trivial.

aaronsteers commented 3 years ago

@andrewcstewart If overly complicated and requiring advanced config, I think it's perfectly reasonable to not have this feature. And especially since the default one is auto-created and we can easily get new/disposable namespaces with the schema/database layer.

andrewcstewart commented 2 years ago

Agreed. Closing this as out of scope.