12-02-2019 12:51 AM
HI,
Please can i know how to get file size from Directory Browser Snap and use it as a filter condition in router. i am able see below options in Snap not anything about size.
Thanks in advance.
12-02-2019 01:27 AM
Hi pranil2k2,
Once you have the Directory Browser snap configured properly (Directory and file filter fields) you should be able to see output field named $[‘Size (in bytes)’]. You can use that field in the router snap.
I’m sharing with you simple pipeline for routing files by size. I’m using shared folder in snaplogic for getting some sample files.
01_DirectoryBrowserSizeIssue_2019_12_02.slp (5.3 KB)
Let me know if you have any questions.
Regards,
Petar
12-03-2019 12:56 AM
Hi,
Thanks for the help and it worked. i am new to SnapLogic, can i know how where to refer the Size condition/function in SnapLogic. i am not able to find it in expression.
and also can i know how to preview data as shown by you?
Thanks in advance.
12-03-2019 04:43 AM
Hi pranil2k2,
In short terms:
When you developing a pipeline in SnapLogic it is really helpful to use Validate option located in the upper right corner (see the picture below).
Pipeline validation will give you preview of the data (binary or document) depending of the output type of the snap.
Once you validation is completed you will be able to put the next snap in the pipeline and when you open it, if the expression is enabled (click on the ‘=’ sign) you will be able to see the input schema and also the javascript functions provided by SnapLogic.
For more details about the SnapLogic you can use:
The official documentation: https://docs-snaplogic.atlassian.net/wiki/spaces/SD/overview
Regards,
Petar
01-07-2020 04:57 AM
Hi Petar,
Thanks for the information.