Q&A: Smart Predict with Live SAP HANA Data - How Does it all Work?

Before you start configuring the different components to set up live SAP HANA connectivity for Smart Predict, here is a quick run through some of the questions you are likely to have before starting:

Q: With live data, what happens during training and application of my predictive models?

A: Your data stays on-premise, so there is no data movement during the training and application workflows.

Smart Predict sends SQL instructions to the on-premise SAP HANA system, that initiates and coordinates the execution of these workflows. Most of the work, including reading and writing to the data, is delegated to the SAP Automated Predictive Library (APL) that is installed on your on-premise SAP HANA system.

During predictive model debriefing, Smart Predict queries predictive model metadata, for example the predictive model performance indicators and influencer contributions, stored in the on-premise SAP HANA system.

However, there are data movement when displaying live datasets in SAP Analytics Cloud. SQL queries go through the SAP Cloud Connector and the data used for the purpose of data preview goes from the on-premise system to the cloud system.

Q: What sort of data sources are available for predictive modeling with live data?

A: Currently, the live connectivity for Smart Predict supports on-premise SAP HANA systems. This does not include SAP Cloud Platform SAP HANA systems.

You can create predictive models on SAP HANA tables (row store or column store), and SAP HANA SQL Views.
Note
While Smart Predict doesn't support SAP HANA Calculation Views, you can create predictive models using an SQL View built manually on top of a Calculation View. You can also materialize data in the calculation views into tables.

SAP HANA 1.0 SPSP12 revision 122.04+, SAP HANA 2.0 SPS04 revision 47+, and SAP HANA 2.0 SPS05 revision 51+ are supported.

Q: How does Smart Predict connect with a SAP HANA on-premise system?

A: Smart Predict connects to the on-premise SAP HANA system by JDBC and through the SAP Cloud Platform Cloud Connector (SCC). The SCC is deployed on the on-premise system and allows any TCP connection from the configured SAP Cloud Platform system to tunnel securely through the Transport Layer Security (TLS) to the on-premise system.

The SCC removes the need to explicitly open any communication port on the on-premise system; it acts as a reverse invoke proxy, as any communication is initiated by the SCC. The SCC component is available on Linux, Windows, and Mac OS X. For more information, see SAP Cloud Connector.

Q: What about authentication and permissions?

A: Authentication to the SAP HANA system relies on the credentials of a SAP HANA technical user defined while setting connection parameters to the on-premise system; see Configuring a SAP HANA technical User in the On-Premise SAP HANA System for information on doing this. Connection parameters are securely stored in a data repository entity on the SAP Analytic Cloud (SAC) side. All SAC users using the same connection entity will share the same SAP HANA technical user. It's possible to define several connections with different technical users pointing to the same SAP HANA system.

The SAP HANA technical user shall be granted with the following rights:

  • Read permissions for training, and application tables and SQL views.
  • Write permissions for output tables.
  • Write permissions for the schema in which predictive models, debriefing, predictions will be persisted.
  • Right to execute APL functions: you need the role: sap.pa.apl.bases.roles ::APL_EXECUTE, which is assigned in SAP HANA, only once APL has been installed.

Q: What sort of IT landscape do I have to set up?

A: Your IT has to setup several things in the SAP HANA system:

  • Install SAP HANA 1.0 SPSP12 revision 122.04+; SAP HANA 2.0 SPS04 revision 47+ and SAP HANA 2.0 SPS05 revision 51+.
    Note

    If you install a SAP HANA 2.0x version, you also need to install the EPM-MDS plug- in to be able to consume the predictions generated by Smart Predict in SAP Analytics Clouds story. This plug-in is already included in SAP HANA 1.x versions. For more information, refer to the SAP note 2444261 Information published on SAP site.

  • Install the correct version (1906 or higher) of the Automated Predictive Library (APL).*
  • Create a write back-schema that corresponds to the Data Repository. See Adding and Configuring the Data Repository in SAP Analytics Cloud for information. It's used to store the predictions and the predictive models.
  • Create a SAP HANA technical user to access the Data Repository, and setup privileges (see above).*
  • Create a SAP HANA workload class if you need it:
    • Create a workload class controlling either the memory or the number threads. See more information for SAP HANA 1x or SAP HANA 2x (depending on your SAP HANA version).

    • Create a workload mapping binding the previously created workload class to the SAP HANA technical user defined in the Data Repository. See more information for SAP HANA 1x or SAP HANA 2x (depending on your SAP HANA version).
  • Install and configure the SAP Cloud Connector (SCC). See Configuring the SAPCP Cloud Connector