Isaac H. Goldstein

11 papers A* 1Misc 7Journal 3
YearRankTypeTitle / Venue / Authors
2022 J jnl
PLoS Comput. Biol.
Isaac H. Goldstein, Damon Bayer, Ivan Barilar, Balladiah Kizito, Ogopotse Matsiri, Chawangwa Modongo, Nicola M. Zetola, Stefan Niemann, Volodymyr M. Minin, Sanghyuk S. Shin
2020 Misc conf
AMIA
Jimmy Chen, Isaac H. Goldstein, Wei-Chun Lin, Michael F. Chiang, Michelle R. Hribar
2020 A* conf
CHI
Adam Rule, Isaac H. Goldstein, Michael F. Chiang, Michelle R. Hribar
2019 Misc conf
AMIA
Wei-Chun Lin, Isaac H. Goldstein, Michelle R. Hribar, David S. Sanders, Michael F. Chiang
2018 Misc conf
AMIA
Isaac H. Goldstein, Michelle R. Hribar, Leah G. Reznick, Michael F. Chiang
2018 Misc conf
AMIA
Michelle R. Hribar, David A. Biermann, Isaac H. Goldstein, Michael F. Chiang
2018 Misc conf
AMIA
Abigail Huang, Michelle R. Hribar, Isaac H. Goldstein, Brad Henriksen, Wei-Chun Lin, Michael F. Chiang
2018 Misc conf
AMIA
Wei-Chun Lin, Isaac H. Goldstein, Michelle R. Hribar, Abigail Huang, Michael F. Chiang
2018 J jnl
J. Am. Medical Informatics Assoc.
Michelle R. Hribar, Sarah Read-Brown, Isaac H. Goldstein, Leah G. Reznick, Lorinna Lombardi, Mansi Parikh, Winston Chamberlain, Michael F. Chiang
2017 Misc conf
AMIA
Isaac H. Goldstein, Michelle R. Hribar, Sarah Read-Brown, Michael F. Chiang
2016 J jnl
J. Appl. Probab.
Eve D. Lathrop, Isaac H. Goldstein, Yung-Pin Chen
redb/settings/clickhouse.py
← Index redb/settings/clickhouse.py python
import os
import clickhouse_connect
from dotenv import load_dotenv

load_dotenv()

# ClickHouse configuration
CLICKHOUSE_HOST = os.getenv("CLICKHOUSE_HOST")
CLICKHOUSE_PORT = os.getenv("CLICKHOUSE_PORT", "9000")
CLICKHOUSE_USER = os.getenv("CLICKHOUSE_USER")
CLICKHOUSE_PASSWORD = os.getenv("CLICKHOUSE_PASSWORD")
CLICKHOUSE_DATABASE = os.getenv("CLICKHOUSE_DATABASE", "default")
CLICKHOUSE_ENFORCE_SSL = os.getenv("CLICKHOUSE_ENFORCE_SSL", "False")

# Cached client instance
_clickhouse_client = None

def get_clickhouse_client():
    """Get ClickHouse client with lazy initialization and caching"""
    global _clickhouse_client
    
    if _clickhouse_client is None:
        _clickhouse_client = clickhouse_connect.get_client(
            host=CLICKHOUSE_HOST,
            port=CLICKHOUSE_PORT,
            user=CLICKHOUSE_USER,
            password=CLICKHOUSE_PASSWORD,
            database=CLICKHOUSE_DATABASE,
            verify=CLICKHOUSE_ENFORCE_SSL,
            settings={
                'max_execution_time': 3600,  # 1 hour timeout
                'connect_timeout': 30,
                'receive_timeout': 30,
                'send_timeout': 30
            }
        )
    
    return _clickhouse_client

def create_clickhouse_client():
    """Create a new ClickHouse client connection (legacy function)"""
    return get_clickhouse_client()

CLICKHOUSE_BINARIES_TABLE = os.getenv("CLICKHOUSE_BINARIES_TABLE", "binaries")