kartothek.utils.store module¶
Workarounds for limitations of the simplekv API.
-
kartothek.utils.store.
copy_keys
(keys: Iterable[str], src_store: Union[simplekv.KeyValueStore, Callable[], simplekv.KeyValueStore]], tgt_store: Union[simplekv.KeyValueStore, Callable[], simplekv.KeyValueStore]])[source]¶ Copy keys between two stores or within one store.
- Parameters
keys (Iterable[str]) – Set of keys to copy without renaming;
src_store (Union[simplekv.KeyValueStore, Callable[[], simplekv.KeyValueStore]]) – Source KV store.
tgt_store (Union[simplekv.KeyValueStore, Callable[[], simplekv.KeyValueStore]]) – Target KV store.
-
kartothek.utils.store.
copy_rename_keys
(key_mappings: Dict[str, str], src_store: simplekv.KeyValueStore, tgt_store: simplekv.KeyValueStore, md_transformed: Dict[str, kartothek.core.dataset.DatasetMetadata])[source]¶ Copy keys between to stores or within one store, and rename them. :param key_mappings: Dict with {old key: new key} mappings to rename keys during copying :type key_mappings: Dict[str, str] :param src_store: Source KV store. :type src_store: simplekv.KeyValueStore :param tgt_store: Target KV store. :type tgt_store: simplekv.KeyValueStore :param md_transformed: Mapping of the new target dataset uuid to the new and potentially renamed metadata of the copied dataset.