Skip to content

Druid

exportbadge

Introduced in v5.0

The Druid backend is experimental and is subject to backwards incompatible changes.

ibis.memtable Support memtable

The Druid backend supports memtables by constructing a string with the contents of the in-memory object. This will be very inefficient for medium to large in-memory tables. Please file an issue if you observe performance issues when using in-memory tables.

Install

Install ibis and dependencies for the Druid backend:

pip install 'ibis-framework[druid]'
conda install -c conda-forge ibis-druid
mamba install -c conda-forge ibis-druid

Connect

ibis.druid.connect

con = ibis.druid.connect(
    host="hostname",
    port=8082,
    database="druid/v2/sql",
)

ibis.druid.connect is a thin wrapper around ibis.backends.druid.Backend.do_connect.

Connection Parameters

do_connect(host='localhost', port=8082, database='druid/v2/sql', **_)

Create an Ibis client using the passed connection parameters.

Parameters:

Name Type Description Default
host str

Hostname

'localhost'
port int

Port

8082
database str | None

Database to connect to

'druid/v2/sql'

ibis.connect URL format

In addition to ibis.druid.connect, you can also connect to Druid by passing a properly formatted Druid connection URL to ibis.connect

con = ibis.connect("druid://localhost:8082/druid/v2/sql")

Last update: August 1, 2023