Leveraging Intelligent Recommendations for Operational Transformation. AMS Partners click HERE | EMEA/APJ Partners click HERE |
11/09/2023 04:31 AM - edited 11/09/2023 04:46 AM
Hi,
We are trying to download the analytics report created in Saviynt and upload it to the SFTP server directory. We referred the saviynt documentation and still not able to complete the usecase. Name of the analytics created is "taskexport". Enabled Save Data checkbox with None context. Save to File is enabled with value 'Analytics/'.
Tested FILES_TO_PUT JSONs which are not working:
1. [
{
"eic_src_dir":"Reports",
"target_dir":"outbound",
"regex_list":["^.*\\.zip","^.*\\.csv","^.*\\.*"]
}
]
2. [
{
"eic_src_dir":"/saviynt_shared/reports/",
"target_dir":"outbound/",
"regex_list":["^.*\\.xlsx"]
}
]
3. [
{
"eic_src_dir":"Reports",
"target_dir":"outbound/",
"regex_list":["^taskexport.*\\.xlsx"]
}
]
4. [
{
"eic_src_dir":"Reports/Analytics/taskexport/",
"target_dir":"outbound/",
"regex_list":["^.*\\.zip","^.*\\.csv","^.*\\.xlsx"]
}
]
5. [
{
"eic_src_dir":"/saviynt_shared/reports/Archive/Analytics/taskexport",
"target_dir":"outbound/",
"regex_list":["^.*\\.zip","^.*\\.csv","^.*\\.xlsx"]
}
]
6. [
{
"eic_src_dir":"Reports/Analytics",
"target_dir":"/outbound/",
"regex_list":["^.*\\.zip","^.*\\.csv","^.*\\.xlsx"]
}
]
Documentation Reference:
1. Configuring the Integration for File Transfer (saviyntcloud.com)
2. Permissible Values for File Transfer (saviyntcloud.com)
Please let me know if any further details are required.
Best regards,
Krunal Kadam
11/09/2023 04:48 AM - edited 11/09/2023 04:51 AM
@krunalkadam try below
[
{
"eic_src_dir":"Reports",
"target_dir":"/home/outbound/",
"file_list":[taskexport.xlsx"]
}
]
Specify correct file extention for the file
taskexport.xlsx or taskexport.csv /.zip
In job trigger action should be upload
Also share the error logs
11/09/2023 04:56 AM
@SumathiSomala
I tried the above JSON in FILES_TO_PUT and got the below error.
ERROR:
java.io.FileNotFoundException: /saviynt_shared/reports/admin/taskexport.xlsx (No such file or directory)
11/09/2023 05:05 AM
The action in Job is upload. Let me know if you need any further details. Below is the error log:
2023-11-09T18:23:41+05:30-connectorms-2023-11-09T12:53:40.620400981Z stdout F 2023-11-09 12:53:40.620 DEBUG [] 7 --- [http-nio-8980-exec-7] c.s.s.s.service.SFTPConnectorService : Exception in uploading file : /saviynt_shared/reports/admin/taskexport.xlsx|com.jcraft.jsch.SftpException: java.io.FileNotFoundException: /saviynt_shared/reports/admin/taskexport.xlsx (No such file or directory)| at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:487) ~[na:na]| at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:365) ~[na:na]| at com.saviynt.ssm.sftpconnector.service.SFTPConnectorService.uploadFile(SFTPConnectorService.java:406) ~[na:na]| at com.saviynt.ssm.sftpconnector.service.SFTPConnectorService.putFilesInDirectory(SFTPConnectorService.java:350) ~[na:na]| at com.saviynt.ssm.sftpconnector.service.SFTPConnectorService.putFilesInTarget(SFTPConnectorService.java:287) ~[na:na]| at com.saviynt.ssm.sftpconnector.SFTPConnector.putFiles(SFTPConnector.java:64) ~[na:na]|Caused by: java.io.FileNotFoundException: /saviynt_shared/reports/admin/taskexport.xlsx (No such file or directory)| at java.base/java.io.FileInputStream.open0(Native Method) ~[na:na]| at java.base/java.io.FileInputStream.open(FileInputStream.java:219) ~[na:na]| at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157) ~[na:na]| at java.base/java.io.FileInputStream.<init>(FileInputStream.java:112) ~[na:na]| at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:474) ~[na:na]| at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:365) ~[na:na]|
11/09/2023 06:31 AM - edited 11/09/2023 07:58 AM
@krunalkadam : Try both below options
This relative path in eis_src_dir will work from v23.8
[
{
"eic_src_dir": "Reports/Analytics/taskexport/",
"target_dir": "<target path, example: /outbound>",
"regex_list": ["^.*\\.zip","^.*\\.csv","^.*\\.xlsx"]
}
]
But I see you are on v23.5, in this version below is the format as per document,So try this as well
[
{
"eic_src_dir": "Reports",
"target_dir": "<target path, example: /outbound/>",
"regex_list": ["^.*\\.zip","^.*\\.csv","^.*\\.xlsx"]
}
]
We were able use v23.8 version successfully in our environment as we are on latest version.
Updated JSONs as I found an issue with regex_list
11/09/2023 07:06 AM
Hi @Saathvik ,
I tried both the options and it is still failing.
Below is the error message i get when i try the one suggested for 23.5 version.
2023-11-09T14:59:48.254012142Z stdout F 2023-11-09 14:59:48.253 DEBUG [] 7 --- [http-nio-8980-exec-10] c.s.s.s.service.SFTPConnectorService : Exception in getFilesUsingRegexFromEIC : |java.lang.NullPointerException: null| at com.saviynt.ssm.sftpconnector.service.SFTPConnectorService.getFilesUsingRegexFromEIC(SFTPConnectorService.java:370) ~[na:na]| at com.saviynt.ssm.sftpconnector.service.SFTPConnectorService.putFilesInDirectory(SFTPConnectorService.java:341) ~[na:na]| at com.saviynt.ssm.sftpconnector.service.SFTPConnectorService.putFilesInTarget(SFTPConnectorService.java:287) ~[na:na]| at com.saviynt.ssm.sftpconnector.SFTPConnector.putFiles(SFTPConnector.java:64) ~[na:na]| at com.saviynt.ssm.connectorms.controller.FileTransferController.putFiles(FileTransferController.java:85) ~[classes!/:2021.1.0.0-SNAPSHOT]| at jdk.internal.reflect.GeneratedMethodAccessor191.invoke(Unknown Source) ~[na:na]|
Below is the error message i get when i try the one suggested for 23.8 version.
2023-11-09T15:03:16.715786566Z stdout F 2023-11-09 15:03:16.715 DEBUG [] 7 --- [http-nio-8980-exec-5] c.s.s.s.service.SFTPConnectorService : Exception in generateInputAttrsforPush|org.json.JSONException: JSONObject["Reports/Analytics/taskexport/"] not found.| at org.json.JSONObject.get(JSONObject.java:572) ~[json-20201115.jar!/:na]| at org.json.JSONObject.getJSONObject(JSONObject.java:782) ~[json-20201115.jar!/:na]| at com.saviynt.ssm.sftpconnector.service.SFTPConnectorService.generateInputAttrsforPush(SFTPConnectorService.java:482) ~[na:na]| at com.saviynt.ssm.sftpconnector.service.SFTPConnectorService.putFilesInTarget(SFTPConnectorService.java:286) ~[na:na]| at com.saviynt.ssm.sftpconnector.SFTPConnector.putFiles(SFTPConnector.java:64) ~[na:na]| at com.saviynt.ssm.connectorms.controller.FileTransferController.putFiles(FileTransferController.java:85) ~[classes!/:2021.1.0.0-SNAPSHOT]|
Let me know if you need any further details.
Best Regards,
Krunal Kadam
11/09/2023 07:57 AM
@krunalkadam : I see issue with regex condition as per line Exception in getFilesUsingRegexFromEIC with v23.5 format. I found an issue in regex I listed where I had additional comma which I corrected and also added additional regex condition. So try below option
[
{
"eic_src_dir": "Reports",
"target_dir": "<target path, example: /outbound/>",
"regex_list": ["^.*\\.zip","^.*\\.csv","^.*\\.xlsx","^.*"]
}
]
11/09/2023 09:33 PM
Hi @Saathvik ,
Still getting the same error after using the updated JSON. Below is the error.
ERROR:
2023-11-10T10:59:11+05:30-connectorms-2023-11-10T05:29:10.915741108Z stdout F 2023-11-10 05:29:10.915 DEBUG [] 7 --- [http-nio-8980-exec-6] c.s.s.s.service.SFTPConnectorService : Exception in getFilesUsingRegexFromEIC : |java.lang.NullPointerException: null| at com.saviynt.ssm.sftpconnector.service.SFTPConnectorService.getFilesUsingRegexFromEIC(SFTPConnectorService.java:370) ~[na:na]| at com.saviynt.ssm.sftpconnector.service.SFTPConnectorService.putFilesInDirectory(SFTPConnectorService.java:341) ~[na:na]| at com.saviynt.ssm.sftpconnector.service.SFTPConnectorService.putFilesInTarget(SFTPConnectorService.java:287) ~[na:na]| at com.saviynt.ssm.sftpconnector.SFTPConnector.putFiles(SFTPConnector.java:64) ~[na:na]| at com.saviynt.ssm.connectorms.controller.FileTransferController.putFiles(FileTransferController.java:85) ~[classes!/:2021.1.0.0-SNAPSHOT]| at jdk.internal.reflect.GeneratedMethodAccessor191.invoke(Unknown Source) ~[na:na]|
Regards,
Krunal Kadam