forked from bellwether/minerva
23 lines
805 B
Python
23 lines
805 B
Python
import minerva as m
|
|
import pprint
|
|
|
|
pp = pprint.PrettyPrinter(indent=4)
|
|
|
|
athena = m.Athena("hay", "s3://haystac-pmo-athena/")
|
|
#query = athena.query(
|
|
#"""SELECT *
|
|
#FROM trajectories.kitware
|
|
#WHERE ST_Disjoint(
|
|
# ST_GeometryFromText('POLYGON((103.6 1.2151693, 103.6 1.5151693, 104.14797 1.5151693, 104.14797 1.2151693, 103.6 1.2151693))'),
|
|
# ST_Point(longitude, latitude)
|
|
#)
|
|
#""")
|
|
query = athena.query("select count(*) as count from trajectories.kitware")
|
|
data = query.results()
|
|
pp.pprint(query.info()['Statistics'])
|
|
|
|
# Everything *needs* to have a column in order for parquet to work, so scalar
|
|
# values have to be assigned something, so here we use `as count` to create
|
|
# a temporary column called `count`
|
|
#print(athena.query("select count(*) as count from trajectories.kitware").results().head(1))
|
|
|