06-08-2017 04:24 AM
Anyone managed to get this to work using dynamic values i.e.
‘MyFileName’ +data.now()+‘.txt’
plus does anyone know how to cause this to fail if the file never turns up?
Currently it seems to finish with success no matter what.
06-08-2017 07:29 AM
see this post
06-08-2017 01:09 PM
Yes, we use the File Poller using dynamic file names in a couple of pipelines and it works well for us.
It may just be a typo in your question, but you need to make sure you use the correct case-sensitive syntax to generate the dynamic file name (See https://doc.snaplogic.com/wiki/display/SD/Date+Functions+and+Properties for Date to-string functions).
As for the success/fail question; the File Poller is designed to poll a file path until a matching file exists, so it will almost always succeed unless the file path becomes unavailable (someone please correct me if I’m wrong). So, depending on your business requirements, if you need to fail, throw an exception, or send notification on a late or missing file delivery, it may be better to use a File Reader on a Task Schedule rather than a File Poller
06-09-2017 01:23 AM
Hi,
Thanks, case-sensitivity is the big leveller.
Just one additional question if I may, how do you throw an exception from within a pipeline?
06-09-2017 06:05 AM
almost most of the snaps have error views enabled.
In the views, under error, choose what to do instead of stopping the
pipeline. When you enable another view will be visible
Thanks & Regards,
Naveen