Define a location data source

You can define a local or network location as a data source for a process.

About this task

When specifying a location data source for a process on a Planning Analytics database, the location must satisfy these requirements:
  • For Planning Analytics on Cloud or Planning Analytics Local, a path relative to the Planing Analytics data directory. For example, ./data_sources/filename.txt or ../data_sources/filename.txt
  • For Planning Analytics on Cloud, a path to the shared s:/ directory that is available in all Planning Analytics on Cloud environments. For example, s:/data_sources/filename.txt
  • For Planning Analytics Local, you can use a path to a mapped network drive, a local drive, or a UNC path if the Planning Analytics database is running on a service account that has access to the location.

When specifying a location data source for a process on Planning Analytics Engine in Planning Analytics as a Service and Planning Analytics on Cloud Pak for Data, the location must be specified as a URL using either the HTTP or HTTPS protocol. The URL must be accessible from the Planning Analytics Engine.

There is no interface for providing authentication credentials, but if the URL you use for the location data source does require authentication, you can authenticate by including an ExecuteHttpRequest function in the Prolog of your process script that identifies the URL and includes an Authentication Header. Functions in the Prolog are executed before the data source is loaded. The ExecuteHttpRequest retrieves a cookie that is stored for the scope of the process and is used for authentication when the process loads the data source.

For example:

#Section Prolog
ExecuteHttpRequest ('POST', 'https://location_data_source_URL', '-h authentication_header');

Define a location data source in Planning Analytics Workspace

Procedure

  1. Open the process in the process editor.
  2. Click the Data Source tab on the process editor.
  3. Click the Data source menu, then click Location.
  4. Click Set variables to initially set variable names and types based on a review of the data source.

    If the variable names that are assigned are not meaningful or familiar to you, you can click a variable name and type a new name. Variable names can contain only letters, numbers, and underscore and must start with a letter.

    It's good practice to give the variables a meaningful name. Having meaningful names makes the process scripts easier to read and troubleshoot.

    Similarly, if the data type for any variable is misidentified, you can click the data type and pick a different type.

  5. Click Save to save the process.