Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Latest commit

 

History

History
40 lines (30 loc) · 1.1 KB

README.md

File metadata and controls

40 lines (30 loc) · 1.1 KB

Pypinot

License Build Status PyPI version

Python DB-API for Apache Pinot

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

Installaion

pip install pypinot

Usage

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)

Contribution

Your Contribution is welcome!