Forum Discussion
Hi Charlie,
Thank you, for the giving other options. I am still struggling to process the files from the first snap.
I am providing my findings for your reference. Appreciate your inputs further.
MultiFileReader Snap is not taking sftp path under folder/file section. I am getting below exception:
The same path is working other Snaps but not in MultiFileReader Snap. Provide your suggestions based on the error.
Multi File Reader( Multi File Reader )
Reads binary data from an endpoint (e.g. file, sldb, s3, sftp, ftp, adl, etc).
Snap has the following errostrong textrs. Please open the info box and edit the highlighted fields.
Could not compile expression: _sftp://ftp.ext.hpe.com:2222/_SC … (Reason: Encountered extraneous input ‘:’ at line 1:4; expecting={, ‘||’, ‘&&’, ‘^’, ‘==’, ‘!=’, ‘>’, ‘<’, ‘>=’, ‘<=’, ‘+’, ‘-’, ‘*’, ‘/’, ‘%’, ‘?’, ‘instanceof’, ‘in’, ‘[’, ‘(’, ‘.’, PropertyRef}; Resolution: Please check expression syntax)
I’ve tried DirectoryBrowser and able to fetch files from the SFTP server and used mapper snap to take filename into the variable. If I use file delete snap again it is throwing same error as multi-file reader snap exception. The file parameter is not taking SFTP path with variable filename.
Appreciate your further support and also let me know how to extract data from the original file. The attributes from the directory browser snap showing bytes and name only.
Thanks in advance,
Amar
Hi Amar,
Let’s first start with the Multi File Reader Snap. If you create a new one, and then in the account tab, create a new account. For one of our internal test accounts, I chose basic auth. I am prompted for user name password, which I give. Next in the main settings tab of the Snap, I input the following under file/folder the format: sftp://hostName/DirectoryStructure/TargetFolder/
Then in the wildcard I put “.csv” And I am able to run successfully. If I look at my output as JSON, I can see “content-location” which includes the absolute path to the file name (including the file name). From this point, you should be able to use a BinaryToDocument Snap in order to operate on the document data. But let’s see how things go up to this point first.
Thanks, and apologies for the delay.
-Charlie
Related Content
- 7 months ago
- 3 months ago