How to use the pinotdb.connect function in pinotdb

To help you get started, we’ve selected a few pinotdb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apache / airflow / airflow / contrib / hooks / pinot_hook.py View on Github external
def get_conn(self):
        """
        Establish a connection to pinot broker through pinot dbapi.
        """
        conn = self.get_connection(self.pinot_broker_conn_id)
        pinot_broker_conn = connect(
            host=conn.host,
            port=conn.port,
            path=conn.extra_dejson.get('endpoint', '/pql'),
            scheme=conn.extra_dejson.get('schema', 'http')
        )
        self.log.info('Get the connection to pinot '
                      'broker on {host}'.format(host=conn.host))
        return pinot_broker_conn

pinotdb

Python DB-API and SQLAlchemy dialect for Pinot.

MIT
Latest version published 5 months ago

Package Health Score

65 / 100
Full package analysis

Popular pinotdb functions