Manage Data Sources

Data sources are the method by which data from back-end systems is retrieved into visualization applications. Data sources accept JSON data.

Data sources receive data using HTTP Get to a URL. The call must return JSON formatted data. (REST or OData). URL query parameters can be substituted using token substitution in the URL.

A substitution token is created by putting __ at each end of a parameter name. When the system detects a URL substitution token, a parameter is displayed in the user interface.

The data source URL has one special parameter __language__ and it can be automatically replaced with the user's language code. This automation allows the back end services to return data in the user's language, if they have such a capability. For example: if you have selected German as a language preference in client browser, the parameter in the URL is replaced with German. Here is an example of how the URL data source configuration changes:

Without a language preference, https://mysite.com/service&lang=__language__ is the URL, however, when the data source is invoked at runtime this URL is modified to this (if the user's language is German): https://mysite.com/service&lang=de_DE.

Data Source Types

The type of data source indicates how and where the returned data is used. For example, if you want to use a data source to populate a pie chart in a viewer that is used in Manage Templates. In this instance, a group type data source is required. You can also use a hierarchy type data source to use with associations.

There are two main items that must be configured when creating a data source. These items are the connection and the mapping. The connection is a Cloud Foundry destination. A mapping transforms the data returned from a connection to the required structure for the connection type.

Connection

Two types of connection are supported for data sources:
  • On Premise: Indicates a connection to an SAP S/4HANA system
  • Internet: Internet is for connections to RESTful services.

The following authentication methods are supported:
  • Basic (username and password)

  • Principal Propagation

  • OAuth2 Client Credentials

  • No Authentication

  • OAuth2 Password Grant

Basic and OAuth2 Client Credentials authentication make connections to back-end systems as a technical user on your behalf. Principle Propagation passes your credentials to the back-end system for authorization.

Defining Connection Parameters

A connection url can include parameters that must be passed. These parameters are indicated by entering __nameOfParameter__. The system detects the word between the “__” as a parameter and replaces the parameter with the supplied value when the connection is used.

For example, a connection URL to retrieve data from a service exposed by SAP S/4HANA can look like this:

https://testsystem1.wdf.sap.corp:44300/sap/opu/odata/sap/ZVE_PROD_DETAILS_CDS/ZVE_PROD_DETAILS('__materialId__')?$format=json

In this instance, the system recognizes that __material__ is a parameter.

The system requires you to supply a material ID to test the connection.

Mapping

The data returned from the connection is expected to be JSON data. In the mapping step, the administrator transforms the data returned from the connection. The complexity of this step varies. The complexity is simple when the connection returns a single record, and complex where the connection returns nested JSON structures that must be grouped.

First you must select a single record. Then you must select which fields in that record you want returned from the data source.

Depending on the type of data source, there can be additional steps. For example, a Grouping type requires selection of the field by which to group.

It’s also possible to define parameters that must be passed into the mapping when executing the data source. For example, if the data source is for grouping, the name of the field by which to group is a parameter.