Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

How to transfer files from DataFiles to an external SFTP server

JPMac
Regular Contributor
Regular Contributor

I want to transfer files from Datafiles to an external SFTP server.

In the SFTP connection's "Files To Put," I have entered the following:

====Files To Put====

[
    {
      "eic_src_dir":"DataFiles",
      "target_dir":"/tmp/",
      "file_list":["file2.csv"],
      "regex_list":["^.*\\.zip"]
    }
]

================

There are files in Datafiles.

JPMac_0-1716346129724.png

 

When I run the job with this setup, it seems there is an issue with eic_src_dir, causing the job to fail.

 

JPMac_2-1716346171796.png

The following log is displayed in the Log Viewer:

DEBUG-Exception in putFilesInTarget : |org.json.JSONException: JSONObject["SourceDirectory"] not found.| at org.json.JSONObject.get(JSONObject.java:570) ~[json-20230227.jar!/:na]| at org.json.JSONObject.getString(JSONObject.java:857) ~[json-20230227.jar!/:na]| at com.saviynt.ssm.sftpconnector.service.SFTPConnectorService.putFilesInDirectory(SFTPConnectorService.java:360) ~[na:na]| at com.saviynt.ssm.sftpconnector.service.SFTPConnectorService.putFilesInTarget(SFTPConnectorService.java:341) ~[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]

 

How should I write "Files To Put" to transfer files from Datafiles to the SFTP server?

 

8 REPLIES 8

rushikeshvartak
All-Star
All-Star

The file upload for Reports keyword in the eic_src_dir configuration now refers to /saviynt_shared/reports directory for the SFTP File Transfer and S3 File Transfer connectors.

https://docs.saviyntcloud.com/bundle/Release-Notes/page/Content/v23/Release-Notes-23-8.htm 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

JPMac
Regular Contributor
Regular Contributor

@rushikeshvartak 

First of all, what I want to transfer is not Analytics Report but Datafiles in the File Directory.

I rewrote Files To Put as follows, but I still get an error that the source directory cannot be found.

[
    {
      "eic_src_dir":"/saviynt_shared/saviynt/Import/Datafiles",
      "target_dir":"/tmp/",
      "file_list":["file2.csv"],
      "regex_list":["^.*\\.zip"]
    }
]

2024-05-22T16:14:56+09:00-connectorms-c.s.s.s.service.SFTPConnectorService-http-nio-8980-exec-3-zjh98-DEBUG-Exception in putFilesInTarget : |org.json.JSONException: JSONObject["SourceDirectory"] not found.| at org.json.JSONObject.get(JSONObject.java:570) ~[json-20230227.jar!/:na]| at org.json.JSONObject.getString(JSONObject.java:857) ~[json-20230227.jar!/:na]| at com.saviynt.ssm.sftpconnector.service.SFTPConnectorService.putFilesInDirectory(SFTPConnectorService.java:360) ~[na:na]| at com.saviynt.ssm.sftpconnector.service.SFTPConnectorService.putFilesInTarget(SFTPConnectorService.java:341) ~[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]|

 

Anyone managed to find the workaround yet?

NM
Valued Contributor
Valued Contributor

Hi @JPMac , instead of giving full directory can you just try with 

Datafiles in eic_src_dir

JPMac
Regular Contributor
Regular Contributor

@Poojasalvi 

No, transferring CSV files from datafile is not resolved.
You can transfer them by specifying "reports/analytics/<report name >."

Chirag_Gupta
New Contributor II
New Contributor II

Could we move the data files to reports and then utilize that report for uploading to SFTP?

@rushikeshvartak  @JPMac 

Thanks,

Chirag Gupta

JPMac
Regular Contributor
Regular Contributor

@Chirag_Gupta 

Yes, you can transfer the reports file to SFTP.

Regards,

 

Yes you can use saviynt REST APIs for same.

Refer Saviynt API Documentation https://docs.saviyntcloud.com/bundle/API-Reference-Guide/page/Content/API-References.htm


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.