added helpers for local files, loading templates, and an example for canceling queries

This commit is contained in:
Ari Brown 2024-01-25 11:10:50 -05:00
parent 5bd2218612
commit ae3173b510
6 changed files with 29 additions and 19 deletions

View file

@ -1,17 +1,15 @@
import minerva
import sys
m = minerva.Minerva("hay-te")
athena = m.athena("s3://haystac-te-athena/")
file = "/tmp/queries.txt"
file = sys.argv[1] # "/tmp/queries.txt"
with open(file, 'r') as f:
txt = f.read()
for line in txt.split("\n"):
if not line:
continue
print(line)
athena.cancel(line)