airflow.providers.google.leveldb.hooks.leveldb
¶
Hook for Level DB.
Module Contents¶
Classes¶
Plyvel Wrapper to Interact With LevelDB Database. |
Attributes¶
- airflow.providers.google.leveldb.hooks.leveldb.DB_NOT_INITIALIZED_BEFORE = 'The `get_conn` method should be called before!'[source]¶
- exception airflow.providers.google.leveldb.hooks.leveldb.LevelDBHookException[source]¶
Bases:
airflow.exceptions.AirflowException
Exception specific for LevelDB.
- class airflow.providers.google.leveldb.hooks.leveldb.LevelDBHook(leveldb_conn_id=default_conn_name)[source]¶
Bases:
airflow.hooks.base.BaseHook
Plyvel Wrapper to Interact With LevelDB Database.
LevelDB Connection Documentation
- run(command, key, value=None, keys=None, values=None)[source]¶
Execute operation with leveldb.
- Parameters
command (str) – command of plyvel(python wrap for leveldb) for DB object e.g.
"put"
,"get"
,"delete"
,"write_batch"
.key (bytes) – key for command(put,get,delete) execution(, e.g.
b'key'
,b'another-key'
)value (bytes | None) – value for command(put) execution(bytes, e.g.
b'value'
,b'another-value'
)keys (list[bytes] | None) – keys for command(write_batch) execution(list[bytes], e.g.
[b'key', b'another-key'])
values (list[bytes] | None) – values for command(write_batch) execution e.g.
[b'value'
,b'another-value']
- Returns
value from get or None
- Return type
bytes | None