| :py:mod:`airflow.providers.google.leveldb.operators.leveldb` |
| ============================================================ |
| |
| .. py:module:: airflow.providers.google.leveldb.operators.leveldb |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.google.leveldb.operators.leveldb.LevelDBOperator |
| |
| |
| |
| |
| .. py:class:: LevelDBOperator(*, command, key, value = None, keys = None, values = None, leveldb_conn_id = 'leveldb_default', name = '/tmp/testdb/', create_if_missing = True, create_db_extra_options = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Execute command in LevelDB |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:LevelDBOperator` |
| |
| :param command: command of plyvel(python wrap for leveldb) for DB object e.g. |
| ``"put"``, ``"get"``, ``"delete"``, ``"write_batch"``. |
| :param key: key for command(put,get,delete) execution(, e.g. ``b'key'``, ``b'another-key'``) |
| :param value: value for command(put) execution(bytes, e.g. ``b'value'``, ``b'another-value'``) |
| :param keys: keys for command(write_batch) execution(List[bytes], e.g. ``[b'key', b'another-key'])`` |
| :param values: values for command(write_batch) execution e.g. ``[b'value'``, ``b'another-value']`` |
| :param leveldb_conn_id: |
| :param create_if_missing: whether a new database should be created if needed |
| :param create_db_extra_options: extra options of creation LevelDBOperator. See more in the link below |
| `Plyvel DB <https://plyvel.readthedocs.io/en/latest/api.html#DB>`__ |
| |
| .. py:method:: execute(self, context) |
| |
| Execute command in LevelDB |
| |
| :returns: value from get(str, not bytes, to prevent error in json.dumps in serialize_value in xcom.py) |
| or None(Optional[str]) |
| :rtype: Optional[str] |
| |
| |
| |