forked from bellwether/minerva
added helpers for local files, loading templates, and an example for canceling queries
This commit is contained in:
parent
5bd2218612
commit
ae3173b510
6 changed files with 29 additions and 19 deletions
15
examples/cancel_queries.py
Normal file
15
examples/cancel_queries.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import minerva
|
||||
import sys
|
||||
|
||||
m = minerva.Minerva("hay-te")
|
||||
|
||||
athena = m.athena("s3://haystac-te-athena/")
|
||||
file = sys.argv[1] # "/tmp/queries.txt"
|
||||
|
||||
with open(file, 'r') as f:
|
||||
txt = f.read()
|
||||
|
||||
for line in txt.split("\n"):
|
||||
print(line)
|
||||
athena.cancel(line)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue