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(self, 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 (Optional[bytes]) -- value for command(put) execution(bytes, e.g.
b'value'
,b'another-value'
)keys (Optional[List[bytes]]) -- keys for command(write_batch) execution(List[bytes], e.g.
[b'key', b'another-key'])
values (Optional[List[bytes]]) -- values for command(write_batch) execution e.g.
[b'value'
,b'another-value']
- Returns
value from get or None
- Return type
Optional[bytes]