kartothek.utils.predicate_converter module

Helper module to convert kartothek dataset load predicates into cube conditions.

kartothek.utils.predicate_converter.convert_predicates_to_cube_conditions(predicates: List[List[Tuple[str, str, Any]]])Sequence[kartothek.core.cube.conditions.Condition][source]

Converts a io.dask.dataset ‘read_dataset_as_ddf’ predicate to a cube condition

Parameters

predicates (list) – list containing a list of single predicates

Returns

condition – cube condition containing the combined predicate definitions

Return type

Condition

kartothek.utils.predicate_converter.write_predicate_as_cube_condition(predicate: Tuple[str, str, Any])kartothek.core.cube.conditions.Condition[source]

Rewrites a single io.dask.dataset ‘read_dataset_as_ddf’ predicate condition as cube condition.

Remark: This function is restricted by “Condition.from_string” which does not allow for IsInCondition and InIntervalCondition and will throw an error if conditions of those types are passed.

Parameters

predicate (list) – list containing single predicate definition

Returns

condition – cube condition containing the predicate definition

Return type

Condition