Airflow Summit 2025 is coming October 07-09. Register now for early bird ticket!

LevelDB Connection

The LevelDB connection type enables tasks to interact with a local (or mounted) LevelDB database by means of airflow.providers.google.leveldb.hooks.leveldb.LevelDBHook (which is a thin wrapper around the Plyvel client).

Default Connection IDs

Hooks related to LevelDB use leveldb_default by default.

Configuring the Connection

LevelDB runs as an embedded key‑value store—there is no server to connect to. Consequently, the Airflow connection only needs enough information to locate (and, optionally, create) the on‑disk database.

Host

Path to the database directory (for example /tmp/testdb or /opt/airflow/data/leveldb). If the directory does not yet exist you may allow the hook to create it via the create_if_missing extra parameter (see below).

Login / Password / Port / Schema

Not used by LevelDBHook. Leave these fields blank.

Extra (optional, JSON)

Additional options accepted by plyvel.DB():

create_if_missing (bool)

When true, a new database directory will be created if it is absent. Defaults to false (raises an error if the path does not exist).

error_if_exists (bool)

Raise an exception if the database already exists (defaults to false).

Any other keyword argument supported by plyvel.DB will be forwarded unchanged.

Example Extra field value:

{
    "create_if_missing": true,
    "error_if_exists": false
}

Was this entry helpful?