For longer transforms, you can use the following format, which is way easier than having to wrap everything in " and including \n and \, because you can just cut and paste code and adjust indenting to match the level of the "transform" key + one level of indent, i.e.:
name: ZenPacks.acme.Events
event_classes:
/Status/Acme:
remove: false
description: Acme event class
mappings:
Widget:
eventClassKey: WidgetEvent
sequence: 10
remove: true
transform: |
if evt.message.find('Error reading value for') >= 0:
evt._action = 'drop'
In the ZenPackLib example, it shows a transform written as follows:
For longer transforms, you can use the following format, which is way easier than having to wrap everything in " and including \n and \, because you can just cut and paste code and adjust indenting to match the level of the "transform" key + one level of indent, i.e.:
Hope that helps someone.