forked from bellwether/minerva
updated athena query example
This commit is contained in:
parent
5dccce53e9
commit
138ee44609
1 changed files with 9 additions and 11 deletions
|
|
@ -13,17 +13,15 @@ athena = m.athena("s3://haystac-pmo-athena/")
|
||||||
# Everything *needs* to have a column in order for unloading to parquet to work,
|
# Everything *needs* to have a column in order for unloading to parquet to work,
|
||||||
# so scalar values have to be assigned something, so here we use `as count` to
|
# so scalar values have to be assigned something, so here we use `as count` to
|
||||||
# create a temporary column called `count`
|
# create a temporary column called `count`
|
||||||
#query = athena.query(
|
query = athena.query(
|
||||||
# """
|
"""
|
||||||
# select round(longitude, 3) as lon, count(*) as count
|
select round(longitude, 3) as lon, count(*) as count
|
||||||
# from trajectories.basline
|
from trajectories.basline
|
||||||
# where agent = 4
|
where agent = 4
|
||||||
# group by round(longitude, 3)
|
group by round(longitude, 3)
|
||||||
# order by count(*) desc
|
order by count(*) desc
|
||||||
# """
|
"""
|
||||||
#)
|
)
|
||||||
|
|
||||||
query = athena.query("select * from trajectories.basline where agent < 100 limit 100")
|
|
||||||
data = query.results()
|
data = query.results()
|
||||||
|
|
||||||
pp.pprint(data.head(10))
|
pp.pprint(data.head(10))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue