Snap type: | Read |
---|
Description: | This Snap polls |
---|
the target directory |
and looks for files matching the specified pattern. It continues polling at the intervals specified in the Polling interval property until the timeout (as specified in the Polling timeout property). The Snap polls the target directory only; subdirectories, if any, are ignored. Once polling is done, the Snap lists out all files matching the specified pattern. Use the Directory Browser Snap to poll files in the directory and all subdirectories as well as to poll a directory only once. The File Poller Snap can be used where an operation is to be triggered when a specific file is found in the target directory. The pipeline can be configured with additional Snaps to process the Snap's output and delete the matched file before the Polling timeout value is reached.
|
Prerequisites: | IAM Roles for Amazon EC2 The 'IAM_CREDENTIAL_FOR_S3' feature is to access S3 files from EC2 Groundplex, without Access-key ID and Secret key in the AWS S3 account in the Snap. The IAM credential stored in the EC2 metadata is used to gain the access rights to the S3 buckets. To enable this feature, the following line should be added to global.properties and the jcc (node) restarted: Please note this feature is supported in the EC2-type Groundplex only. For more information on IAM Roles, see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html |
---|
Support and limitations: |
|
---|
|
Account: | This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. This Snap supports several account types, as listed in the table below, or no account. See Binary Account for information on setting up these types of accounts. Account types supported by each protocol are as follows: |
---|
Required settings for account types are as follows: |
|
Views: |
|
---|
|
|
Settings | ||
---|---|---|
Label |
Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | ||
Directory |
| This property is a URL path to the directory where files will be searched. The expected syntax is: The supported file protocols are:
|
---|
The property can be a JavaScript expression which will be evaluated with values from the input view document and the pipeline parameters. The property should have the syntax:
[protocol]://[host][:port]/[path]
Example:
Default value: [None]
|
|
|
|
Example:
|
|
Default value: [None]
|
s3:///[bucket_name]/[dir_path]
sftp://ftp.snaplogic.com:22/home/test/dir
ftp://ftp.snaplogic.com/test/csv
$directory
(The value of the $directory is obtained from the input document and the document should have an entry with the "directory" key. You must press the '=' button.)_directory
(A key/value pair with "directory" key should be defined as a pipeline parameter. You must press the '=' button.)file:///D:/testFolder/
(if the Snap is executed in the Windows Groundplex and needs to access D: drive)wasb:///Snaplogic/testDir/
or wasbs:///Snaplogic/testDir/
(if the name of the container is 'Snaplogic')gs:///testBucket/testDir/
(if the bucket name is 'testBucket')
| ||
File filter | Required. |
---|
A GLOB pattern to be applied to select one or more files in the directory. The File filter property can be a JavaScript expression which will be evaluated with values from the input view document.
Default value: [None] |
Polling interval in seconds | Required. |
---|
The time-gap between each poll request (in seconds). Example: 10 Default value: 30 |
Polling timeout | Required. |
---|
A |
period of time after which file polling must end. You specify the number here and the time unit in the next property. Its unit is selected in the next property. Example:
Default value: 30
| |||
Polling-timeout unit | Unit for |
---|
the polling timeout. Allowed values are SECONDS, MINUTES and HOURS. Example: SECONDS Default value: MINUTES |
Examples
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|