Evaluates a condition and performs an action in case it is false. The parameter "complement" may be used to invert this, meaning the action will be performed if the condition is true.
The following actions are supported:
- remove: remove entire extract
- raise: log an entry and mark it as a transformation error
- notify: notify users who are subscribed to the "Transformation Error" topic for affected Datastreams through either email, Slack or Microsoft Teams
- break: cut the extract at the first instance of the condition appearance and discard all following rows
Example

I Ain't Afraid of No Code!
[
[
"if",
{
"action": "raise",
"message": "No Hauptversion for Mediaplan '{Campaign Name}' [{source_filename}]",
"complement": true,
"subtable": null,
"condition": "re.match('^\\\\d+\\\\.\\\\d+\\\\.000.*',{Master Campaign})",
"_comment": null
}
]
]
param str action: Action to be taken if condition is not matched: raise , notify , break , remove.
param str message: Message sent to subscribers.
param boolean complement:
param str subtable: Name a subtable in which output will be stored (will create subtable where necessary).
param str condition: Condition as expression.
param str comment: A comment that will appear in the Transformation UI.
Comments
0 comments
Article is closed for comments.