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

blcksrx/pypinot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!