If you’re looking to transform data directly in the action inputs editor,
check out Tracecat inline functions.
core.transform.reshape
: Reshape and manipulate data.core.transform.filter
: Filter a list of items.core.transform.is_in
: Check if an item is in a list.core.transform.not_in
: Check if an item is not in a list.core.transform.deduplicate
: Deduplicate a JSON object or a list of JSON objects given a list of keys.core.transform.apply
: Apply apython_lambda
function to a value.core.transform.map
: Apply apython_lambda
function to each item in a list.
Deduplicate
Deduplicate a list of JSON objects given a list of keys. ExamplesPython Lambda
Some transform actions (e.g.core.transform.filter
, core.transform.map
) accept an input called python_lambda
.
python_lambda
is a Python Lambda function given as a string.
It allows you to use small snippets of Python code to transform data and define conditions.
Python lambda functions are small anonymous functions that are used to define simple functions that are passed to other functions.
You can learn more about them here.
It can be hard to escape special characters in YAML.
Werecommend using
python_lambda
with the >-
and >
YAML block modifiers
to avoid these issues: