How to connect SAP Analytics Cloud to SAP Cloud Platform IoT Application Enablement – part 2
In the last blog we´ve seen how we can using a node js “proxy app” to get access via basic auth to the OData services from SAP Cloud Platform IoT Application Enablement (AE).
Pleas check also the other blogs about the series:
|1||How to connect SAP Analytics Cloud to SAP Cloud Platform IoT Application Enablement – part 1|
|2||Build up an IoT App on top of SAP Cloud Platform Application Enablement|
|3||Deploy your SAP Cloud Platform IoT Application Enablement App to the Cloud Foundry Environment|
|4||How to display a route in a SAP Cloud Platform Application Enablement IoT Application|
|5||How to connect SAP Analytics Cloud to SAP Cloud Platform IoT Application Enablement (this blog) – part 1|
|6||How to connect SAP Analytics Cloud to SAP Cloud Platform IoT Application Enablement – part 2 (this blog)|
In the upcoming line i will now show how retrieve the data in SAP Analytics Cloud (SAC) an finally we build up an simple visualization of our data.
But first of all, lets have a look about the scenario as a little recap:
As we now from the last blog we will now switch to SAP Analytics Cloud (SAC):
In Detail we proceed these simple steps:
- Create a new connection on SAC
- Create a new Model
- Create a Story to display the data
Create a new connection for SAP CP IoT AE ind SAP Cloud Analytics
Afte we´ve succesfully logged in to our SAC tenant, choose from the menu the “Connection” entry:
And create now a new connection from type “OData Services”:
Provide the following details:
|Connection Name||e.g. SAP Cloud Platform IoT Application Enablement|
|Description||e.g. SCP IoT AE conn. via basic auth|
Data Service URL
|Authentication Type||Basic Authentication|
The final result should look like this:
Save the config by pressing the OK button.
Create a new Model
After we´ve successfully added our connection, we need now to create a new Model.
For this chose from the menu “create > model”:
In the upcoming screen choose “Get data from an app” option and select OData Services:
Now we select the connection which we´ve create before and select “Create a new query”:
In the next screen we get now the first response from our “proxy/OData service” not bad ;o)
That´s looks identical to our entities which we get requesting the following url:
Create the query
After we select the “Build Query” option on our “Aggregates” entity we can define the query by drag an drop the required properties:
We need now to define this one via the “queury builder”
/aggregates?$filter=id eq 'id1' and time ge datetime'2017-01-01T00:00:00' and time lt datetime'2017-03-01T00:00:00' id1 = SAP CP IoT AE Thing ID
The result which we´re using to retrieve our data looks like this:
If it works we get now an info about our query:
and by clicking on it, we get an overview from our raw data which are uploaded to SAC:
Afterwards we can now create the model (i do not changing here anything) and finally we see it now under models in SAC:
Create the story of your IoT data
The last step for now is to creat a new story based on our data.
For this choose again the menu>create>story:
Choose a template of your choice or start with a blank page:
Afterwards we can now define the charts with the measures and dimensions. As result we get now our dashboard about our SAP CP IoT AE data (based on the aggregates OData service):
Thats it…..happy easter!
Finally i think another nice way to combine different tools and technology to get access to our IoT data.
I know the use of the node js app. as proxy to bypass OAuth is not the best way and hopefully SAP Analytics Cloud allows soon the option of OAuth based authentification.
But i works…..