Allowing Data Import and Model Export with a File Server

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.

Prerequisites

The SAP Analytics Cloud agent must be installed. For more information, see Installing SAP Analytics Cloud Agent.
Note

If you have used the SAP Analytics Cloud Agent Simple Deployment Kit to install the SAP Analytics Cloud Agent, you must update the file server import allowlist file following the instructions in the Post-Setup Guide instead of the instructions below.

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.
Note
Any users under the specific tenant will have access to all files defined within the allowlist.

Context

For importing data, a file server location allowlist must be configured. Only file server paths allowed by this allowlist can be accessed when creating a model from file, or importing data from files.

For exporting models, another file server location allowlist must be configured. Only file server paths allowed by this allowlist can be accessed when exporting a model.

Procedure

  1. Create an allowlist file as a text document: allowlist.txt.
    Example allowlist.txt:
    \\<YourHostName>\Import
    The file must follow the following format:
    • The file must be encoded in UTF-8 format.
    • Each line in the file should specify only one allowed path. All descendant paths will be allowed.
    • 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\folder2 or \\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.
    Note
    Leading, trailing, and empty lines are ignored.
  2. Define the file server allowlist using one of the following methods:
    • Add the allowlist location in your Tomcat JVM properties.

      In the Apache Tomcat GUI tool, go to the Java tab. Under Java Options, add one of these lines:

      • For import data: -DSAP_CLOUD_AGENT_FILE_SERVER_WHITELIST_PATH=<AllowlistFilepath>
      • For export model: -DSAP_CLOUD_AGENT_FILE_SERVER_EXPORT_WHITELIST_PATH=<AllowlistFilepath>

      Alternatively, you can add the allowlist 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_PATH or SAP_CLOUD_AGENT_FILE_SERVER_EXPORT_WHITELIST_PATH to the location of the allowlist file.

    You must specify the complete path up to and including the allowlist file. For example, C:\<full path to file>\allowlist.txt.

    Note

    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.
    Note
    Updates to the allowlist 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, go to Start of the navigation path (Main Menu) Next navigation step  System Next navigation step  Administration Next navigation step System ConfigurationEnd of the navigation path.
  5. Select (Edit).
  6. For data import, turn on Allow model import from File Server. For model export, turn on Allow model export to File Server.
  7. Select (Save).
  8. Go to Start of the navigation path (Main Menu) Next navigation step  Connection Next navigation step Connections Next navigation step  (Add Connection) Next navigation step Import Data Connection Next navigation step File ServerEnd of the navigation path.
  9. In the dialog, enter a Connection Name, Description, and the Folder Path.

    The Folder Path should match the path listed in your allowlist file.

  10. Select Create.

Results

The environment variables and allowlist files are polled once a minute.