Apache Pinot is a realtime distributed OLAP datastore, designed to answer OLAP queries with low latency. This package provides DB API to interact with Apache Pinot
pip install pypinot
Using the DB API:
from pypinot.connection import Connection
conn = Connection(host='localhost', port=8099, path='/query', scheme='http')
cur = conn.cursor()
cur.execute("""
SELECT place,
CAST(REGEXP_EXTRACT(place, '(.*),', 1) AS FLOAT) AS lat,
CAST(REGEXP_EXTRACT(place, ',(.*)', 1) AS FLOAT) AS lon
FROM places
LIMIT 10
""")
for row in cur:
print(row)
Your Contribution is welcome!