core.transform.apply
Apply a Python lambda function to a value.
Inputs
Python lambda function as a string (e.g.
"lambda x: x.get('name')").Value to apply the lambda function to.
Examples
Filter, transform, and compactcore.transform.filter
Filter a collection using a Python lambda function.
Inputs
Items to filter.
Filter condition as a Python lambda expression (e.g.
"lambda x: x > 2").Examples
Filter, transform, and compactcore.transform.map
Map a Python lambda function to each item in a list.
Inputs
Items to map the lambda function to.
Python lambda function as a string (e.g.
"lambda x: x.get('name')").Examples
Filter, transform, and compactcore.transform.drop_nulls
Remove null values from a list.
Inputs
List of items to filter.
Examples
Filter, transform, and compactcore.transform.is_in
Filters items in a list based on whether they are in a collection.
Inputs
Collection of hashable items to check against.
Items to filter.
Python lambda applied to each item before checking membership (e.g.
"lambda x: x.get('name')"). Similar to key in the Python sorted function.Default: null.Examples
Keep or exclude matching itemscore.transform.not_in
Filters items in a list based on whether they are not in a collection.
Inputs
Collection of hashable items to check against.
Items to filter.
Python lambda applied to each item before checking membership (e.g.
"lambda x: x.get('name')"). Similar to key in the Python sorted function.Default: null.Examples
Keep or exclude matching itemscore.transform.deduplicate
Deduplicate a JSON object or a list of JSON objects given a list of keys. Returns a list of deduplicated JSON objects.
Inputs
JSON object or list of JSON objects to deduplicate.
List of JSONPath keys to deduplicate by. Supports dot notation for nested keys (e.g.
['user.id']).Time to live for the deduplicated items in seconds. Defaults to 1 hour.Default:
3600.Whether to persist deduplicated items across calls. If True, deduplicates across calls. If False, deduplicates within the current call only.Default:
true.Examples
Deduplicate by a stable keycore.transform.is_duplicate
Check if a JSON object was recently seen.
Inputs
JSON object to check.
List of JSONPath keys to check.
Time to live for the deduplicated items in seconds. Defaults to 1 hour.Default:
3600.Examples
Deduplicate by a stable keycore.transform.flatten_json
Flatten a JSON object into a single level of fields.
Inputs
JSON object to flatten.
Examples
Flatten and query JSONcore.transform.eval_jsonpaths
Eval multiple JSONPath expressions on an object.
Inputs
JSON object to eval JSONPath expressions on.
JSONPath expressions to eval.