SAP Data Warehouse Cloud is an enterprise-class Data Warehousing solution on Cloud by SAP. Powered by SAP HANA Cloud services, it integrates heterogeneous data from multiple sources and enables you to do advanced analytics using SAP Analytics Cloud.
This tool provides you with the flexibility to connect to both cloud and on-premise systems. You can also bring in data via third party ETL tools to SAP Datawarehouse Cloud. Currently, it supports SAP ABAP, SAP HANA, and OData connections. The scope of this blog is limited to connecting ABAP CDS views that are exposed as OData Service and Data modeling using the exposed objects via Data Builder capabilities of SAP Data Warehouse Cloud. To know more about ABAP CDS please refer to this blog.
OData (Open Data Protocol) is a standard that helps in the creation and consumption of RESTful APIs. Data Objects from both SAP and non-SAP systems can be exposed to other systems using the OData Protocol.
The simplest way of exposing a CDS view from an S4H system as OData Service is by using the annotation @OData.publish: true in the definition of the CDS. The following types of CDS views can be exposed using OData Protocol and consumed in SAP Data Warehouse Cloud.
|Basic View||@VDM.ViewType: #BASIC|
|Composite View||@VDM.ViewType: #COMPOSITE|
|Consumption View||@VDM.ViewType: #CONSUMPTION|
|With Table Function||AMDP Table function is created that returns some value implementing any of the defined methods.|
|With Join||A Simple Join is created|
|With Association||The associated object stands as a separate Entity in the exposed OData service.|
The OData URL exposed from the CDS view will have the following syntax – https://<ServerName>:<PortNo>/sap/opu/odata/sap/<VIEW_NAME_CDS>/
Log into SAP Data Warehouse Cloud and navigate to the connections page by clicking on the highlighted icon in the left panel. A new Connection can be configured to the OData Source by clicking on the ‘+’ icon.
Provide connections details as explained below.
Once the Connection is created, check its validity by clicking on the highlighted icon.
In this case, let us assume that we have a created a connection called ‘WriteBack’ to consume objects exposed as OData.
Click on the highlighted icon in the left panel to view the available Spaces for which you have access in SAP Datawarehouse Cloud System. Select the desired Space. In this case, Space ‘OData’ is selected.
The created Connection needs to be added to the Space selected to be able to consume the objects exposed as part of the connection ‘WriteBack’.
In addition, Users who require access to Space can also be added.
Click on the highlighted ‘Data Builder’ icon in the left panel and select the Space ‘OData’.
Click on the option ‘New Graphical View’.
The Entities under the OData Connection ’WriteBack’ can be viewed by expanding the connection.
When you click and drag an Entity into the canvas for the very first time a dialog box will pop up with ‘Import and Deploy’ option. The below action creates a Remote Table in the Space selected for the corresponding Entity.
Preview of the data can be done in order to check the data consistency.
In the below example, Transaction data pertaining to Products, Dimension data pertaining to Product Category and Product Type which are exposed as OData are added as Remote Tables. You can include multiple Remote Tables/Views and build calculation view based on the business requirement using Data Modelling capabilities of SAP Data Warehouse Cloud. The resultant Calculation view can be consumed in SAP Analytics Cloud Stories and in other Calculation Views as well.