Skip to content
This repository was archived by the owner on Jul 20, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions aws-blog-athena-importing-hive-metastores/exportdatabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

with open(schema+filename,mode='w+') as output:
for t in tables:
output.write('!echo DROP TABLE IF EXISTS `'+t[:-1]+'`\;;\n')
output.write('show create table '+t[:-1]+';\n')
output.write('!echo DROP TABLE IF EXISTS `'+schema+'.'+t[:-1]+'`\;;\n')
output.write('show create table '+schema+'.'+t[:-1]+';\n')
output.write(separator+'\n')

command="hive -f "+schema+"_tables.hql -S >> "+schema+".output"
Expand Down