Hi All. I would like to be able to look up an icao24 and get all StateVectors between two timestamps. The example on this page:
Shows how to do that using the Impala shell. I can run this query from the Impala shell and it works:
[hadoop-1:21000] > SELECT COUNT(*) FROM state_vectors_data4 WHERE icao24='a0d724' AND time>=1480760100 AND time<=1480764600 AND hour>=1480759200 AND hour<=1480762800;
Now I'd like to do the same thing from Python. I'm using impyla, which is here:
And I'm trying this code, based on one of their examples:
from impala.dbapi import connect
conn = connect(host='data.opensky-network.org', port=2230,
cur = conn.cursor()
res = cur.fetchall()
It gets to the first print statement, and prints:
<impala.hiveserver2.HiveServer2Connection object at 0x7f0b416da090>
So that's good so far. Then it hangs when running conn.cursor().
Does anyone have experience with this?
Alternatively, it looks like I can use the OpenSkyApi. I can run this example, and it works:
from opensky_api import OpenSkyApi
api = OpenSkyApi(username=user, password=password)
s = api.get_states(icao24='a65c95')
But it doesn't look like that API allows me to get historical data from a time interval. Or does it?
Any help would be appreciated!