Transferring Files to FTP Server
Perform the following steps after creating the FTP connection to transfer files to the FTP server using Sigma Studio:
- Click the Data Source icon on an existing FTP connection, e.g. NEW FTP CONNECTION.
Refer Connectors – FTP for more information on creating an FTP connection.
The Create New Data Source page appears. Select the appropriate corporate client or customer from the Client lookup field, e.g. HIGHSCORE.
The All Clients option appears as the default one in the Client lookup field. For detailed information on creating corporate customers or clients, refer Creating Corporate Customers.
- Enter a unique data source name in the Data Source Name field, e.g. FTP PF DS.
Select the Put File option in Request Type to send the requested file to the FTP server.
Provide the appropriate file path on the FTP server to which the files need to be transferred to the server in the Relative Path on Server field, e.g. Newfolder.
On providing an incorrect FTP server path in the Relative Path on Server field, an error message appears, indicating that the provided FTP server path is invalid, as shown in the following screen shot:
The Local File Path and File Name are optional fields. Both the Local File Path and File Name fields are not required to create an FTP DS, with the Put File Request Type. It is sufficient only if you provide the appropriate server path in the Relative Path on Server field. You can send the files of following formats to the FTP server:
- CSV
- XLS
- DOCX
- TXT
- HTML
- XML
Click Save to save the FTP data source.
You can even proceed to save the FTP data source without having to customize the configured FTP connection. On saving the FTP data source without customizing the client for the configured FTP connection, the following pop-up message, appears, as shown in the following screen shot:
- Click Yes, to create the FTP data source.
When you try to exit the Data Source screen, before saving the configured FTP data source, a warning pop-up message appears, as shown in the following screen shot:
- Click Cancel, if you do not want to exit the Data Source screen.
- Click Ok, if you want to exit the Data Source screen.
A success message for creating the data source appears, as shown in the following screenshot:Click Ok.
In order to trigger the FTP service connection, the CT platform's server-side API, CT.ftp must be used while passing the ExecutionContext action in a Java Handler class. Refer the following sample code snippet for better understanding on the triggering process:
Here, on the following sample code snippet a new ExecutionContext action is created within which a map (HashMap) is built. The FTP datasource ID is passed as the input to activate the connection request within which the CT.ftp API is passed to trigger the process.
ExecutionContext ec = new ExecutionContext(); Map inputParams1 = new HashMap(); inputParams1.put("DATA_SRC_ID","FTP_PF_DS"); // FTP_PF_DS refers to the Datasource ID. ec.setInitialRequestData(inputParams1); try { CT.ftp(ec); } catch(Exception e){ }
Once the FTP data source is created, you can proceed to configure a report based on your needs and requirements. For configuring reports that need to be sent to the FTP server, refer Configuring FTP Server for Reports.
Copyright © Intellect Design Arena Limited.
All rights reserved. These materials are confidential and proprietary to Intellect Design Arena Limited and no part of these materials should be reproduced, published in any form by any means, electronic or mechanical including photocopy or any information storage or retrieval system nor should the materials be disclosed to third parties without the express written authorization of Intellect Design Arena Limited.