This entry guides you through the steps to search for certain keywords based on the script output. The Chainset in this example carries out the following tasks:
→ Run a script using an ETL chain.
→ Search for certain keywords based on the values the script returns.
→ Define an If-Else chain step and send a Email notification where necessary.
1/ Firstly, do refer to Step 1 and Step 2 of the following entry below as a guide on how to create an ETL Chainset to run a script.
2/ Using the same ETL Chainset, add another step called “Array Contains” and define the keyword to be searched based on the script output as shown in the screenshot below.
Array Field refers to the field that outputs the script results.
Value is the field to input in the string/integer value to test against.
Result Field refers to the field that will be set to true of the array contains the fixed value, else false.
3/ Based on your use case, you may either add a “Chain If” step to invoke 1 Chainset. Else, you may choose to add a “Chain If Else” step to invoke 2 different Chainset’s based on the results from Step 2.
4/ Here’s an example of a Chainset that sends an email notification. **Do take note that email server needs to be configured accordingly in the etc/application.conf file.