Forum Discussion

mtran21's avatar
mtran21
New Contributor III
5 years ago
Solved

How to write an expression?

Hi,

I am using Directory Browser snap to try to do following with Expression Builder but I do not know how:

  1. Check if the files in a directory contains any of the following extension (.txt, .csv) If not give error
  2. Check if the filesize of each file is greater than zero. If equal zero then give error

How to write this in expression builder?
Thanks

3 Replies

  • Colossal8333's avatar
    Colossal8333
    New Contributor II

    Yes, sorry could've made that clearer - I only want the pipeline to execute if there is data, because the second phase sends a Slack notification, and I only want that notification sent if the data is present (error logs).

    I like the filter recommendation - thank you!