How to configure File Server for importing data and exporting a model
The SAP Analytics Cloud agent must be configured in order to allow importing data from a file server or exporting a model to a file server.
The SAP Analytics Cloud agent must be installed. For more information, see Installing SAP Analytics Cloud Agent.
Data import from file server or model export to file server will assume the file permission level based on the user that started the Tomcat process. For import, read permission is required. For export, write permission is required. The user depends on your Tomcat setup. This may be the Windows system user, a specific user account that started Tomcat as a service in Windows, or the user that executes startup.bat for Windows or startup.sh for Linux. The system administrator must ensure this user has permissions to access the local share or the network share on a different machine.
Any users under the specific tenant will have access to all files defined within the whitelist.
For importing data, a file server location whitelist must be configured. Only file server paths allowed by this whitelist can be accessed when creating a model from file, or importing data from files.
For exporting models, another file server location whitelist must be configured. Only file server paths allowed by this whitelist can be accessed when exporting a model.
1. Create a whitelist file.
The file must follow the following format:
- The file must be in UTF-8 format.
- Each line in the file should specify only one allowed path. All descendant paths will be allowed. This is very important line, and 99% error will happen due to missing entry
- The folder path is system specific. If the agent is running on a Microsoft web application server, the path should follow Windows format. For example: C:\folder1\folder2or \\servername\volume\path. If the agent is running on a Linux system, the path should follow Linux format. For example, /net/abc/
- Multiple lines are allowed
Windows example here:
Leading, trailing, and empty lines are ignored.
2. Define the file server whitelist
Using one of the following methods, add the whitelist location in your Tomcat JVM properties.
In Apache Tomcat 7.0, in the Properties menu, select the Java tab. Under Java Options, add one of these lines:
- For import data: -DSAP_CLOUD_AGENT_FILE_SERVER_WHITELIST_PATH=<WhitelistFilepath>
- For export model: -DSAP_CLOUD_AGENT_FILE_SERVER_EXPORT_WHITELIST_PATH=<WhitelistFilepath>
Alternatively, you can add the whitelist location to JAVA_OPTS.
Please refer to the Apache Tomcat guide for detail.
- Set the operating system environment variable SAP_CLOUD_AGENT_FILE_SERVER_WHITELIST_PATHor SAP_CLOUD_AGENT_FILE_SERVER_EXPORT_WHITELIST_PATH to the location of the whitelist file.
You must specify the complete path up to and including the whitelist file. For example, C:\<full path to file>\whitelist.txt.
If you choose to use an environment variable, you must restart Tomcat.
- If you’re running Tomcat via command line: Shut down the existing Tomcat process, then add the environment variable, and then start Tomcat from a new command line window.
- If you’re running Tomcat as a Windows service: Restart the Tomcat service by using the Tomcat configuration manager.
3. Restart the SAP Analytics Cloud agent.
Updates to the whitelist environment variable will not take effect until the agent is restarted, and after restart, may require up to one minute to take effect.
4. In SAP Analytics Cloud, update System Configuration
Go to (Main Menu) System Administration System Configuration
For data import, turn on Allow model import from File Server. For model export, turn on Allow model export to File Server.
5. Add connection details
Go to connection and click the + sign to add
Enter ‘Connection information’, and connection Details”
Connection details will be location to your Import or Export folder
Save your entry
Results: File system setup is complete
The environment variables and whitelist files are polled once a minute.