Skip to content
Snippets Groups Projects
Commit 5087a463 authored by vlorentz's avatar vlorentz
Browse files

athena: Fix create_table to work with restricted permissions

For some reason, using a non-existing database works when working with
credentials with unnecessarily high privileges (though it is not clear
to me which permissions allow this).
parent b2ae0826
No related branches found
No related tags found
No related merge requests found
......@@ -107,12 +107,14 @@ def create_tables(database_name, dataset_location, output_location=None, replace
"""
client = boto3.client("athena")
client.output_location = output_location
client.database_name = database_name
client.database_name = "default" # we have to pick some existing database
query(
client,
create_database(database_name),
desc="Creating {} database".format(database_name),
)
client.database_name = database_name
if replace:
for table in TABLES:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment