Skip to content

Instantly share code, notes, and snippets.

@mneedham
Last active Jul 20, 2021
Embed
What would you like to do?
Basic Pinot query rendered in Streamlit
import streamlit as st
from pinotdb import connect
import pandas as pd
st.title("GitHub Events")
broker_port = 8000
conn = connect(host='localhost', port=broker_port, path='/query/sql', scheme='http')
query = f"""
select organization, count(*) AS count
from pullRequestMergedEvents
group by organization
order by count DESC
limit 10
"""
curs = conn.cursor()
curs.execute(query)
st.header("Most active organisations")
st.table(pd.DataFrame(curs, columns=[item[0] for item in curs.description]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment