Getting started with SAP Analytics Cloud, Embedded Edition (BTP service). Part I
I am a Customer Engagement Partner who helps SAP client to adapt our P&T cloud solutions. So I faced with the Client’s request about implementing this service. Here is my experience to roll-out the service with the connection to SAP HANA Cloud. Previously I’ve been an Analytics & EPM presale expert. So I have a great experience working with standalone SAP Analytics Cloud since 2017 and it was very interesting to find all necessary information and validate it. Hope this article will help you to avoid some troubles and save your precious time.
This is my the very first blog post and I dedicate it to SAP Analytics Cloud, embedded edition which is available as a service on SAP BTP platform. Link to the service page on SAP Discovery Centre.
What is SAP Analytics Cloud, embedded edition?
At first we should answer the question what is the difference between “SAP Analytics Cloud, embedded edition” “SAP Analytics Cloud embedded functionality”. The last one is commonly used to position SAC as a single analytical solution and its ability to embed dashboards into different SAP LoB Solutions (SuccessFactors, Ariba, CX… ) or standalone applications with the help of SAC URL API.
The “SAP Analytics Cloud, embedded edition” service is available since February 2019 (by Aaron Graber) and positioned as a solution to enable BI capabilities inside business applications (“microservice for application developers”).
For the whole process and success you will use SAP BTP Platform cockpit, SAP Analytics Cloud, embedded edition, SAP Business Application Studio, SAP HANA Cloud and Postman.
Also I will try to keep names, IDs and passwords for you to better understand which one and where is used. But they will not accessible cause the service will be deleted till the time when this post is published.
Comparing to well-known SAP Analytics Cloud which is available by a subscription SAP Analytics Cloud, embedded edition available only for SAP BTP customers with CPEA and PAYG contracts. The price can be found on the next tab in Discovery Center. As you can see it has a limit of 150 CS (concurrent sessions) and charges by hours (and you can’t start/stop it but only delete/create service from your BTP subaccount).
SAP Analytics Cloud, embedded edition has reduced scope and functionality. That’s why the most of backend setup is made by API and not via well-known user interface. This is actual for both Security/Users and Connections sections.
Talking about data sources: SAP Analytics Cloud, embedded edition can only has live-connection to SAP HANA Cloud. But as you will see later, it doesn’t support native “SAP HANA Cloud” connection type which is available for SAP Analytics Cloud (as for now, August 2021). So the only option for you will be the usage of HANA Analytics Adapter (HAA) and there is also some difference and updates comparing the blog posts about HAA.
So let’s get started. The plan of this Part I has the next steps:
- Create a service
- Theoretical part. Difference between SAP Analytics Cloud, embedded edition and SAP Analytics Cloud.
- Install Postman and SAP Analytics Cloud, embedded edition API tenant management
- Create a user via API and user management
- Access to SAP Analytics Cloud, embedded edition tenant in Chrome browser
The other steps will be described in Part II blog post.
1. Creating SAP Analytics Cloud, embedded edition service in SAP BTP cockpit (Feature B)
- You have SAP BTP contract by CPEA or PAYG commercial models.
- You have created a subaccount in one of the following regions: AWS: Australia (Sydney), Brazil (São Paulo), Europe (Frankfurt), Japan (Tokyo), Singapore, US East (VA)
- Your profile has an authorization to provide Entitlements for subaccount on GA (Global Account) level or your GA administrator have entitled SAP Analytics Cloud, embedded edition service for you subaccount and you are subaccount administrator.
- Log in into your Global Account cockpit https://cockpit.eu10.hana.ondemand.com/cockpit/
- Open Account Explorer and Create a new subaccount and select desired region on AWS landscape.
- Go to Entitlements->Entity Assignments, select your subaccount and press Go.
- Press Configure Entitlements and then Add Service PlansNew window opens
Find or filter SAP Analytics Cloud Embedded Edition, select Plan and click Add Service Plan
Don’t forget to Save your changes
- Navigate to your subaccount via Account Explorer or just click on the link on the page
- Check that SAP Analytics Cloud, embedded edition is available in Entitlements. Enable Cloud Foundry (if not done before).
Create Space (if not done before) and name it as you want.
- Create Quota Plan and assign it to your Space
- Go to Instances and Subscription and Create a new SAP Analytics Cloud, embedded edition instance
- After instance has been created (it takes a while) go to parameters
- Click on the service and generate Service Keys.
- Save created Service Key as a file. We will use this data to setup our SAP Analytics Cloud, embedded edition tenant in chapter 3.
You should have something like that:
- If you try to access “sac_embedded_edition_service” URL and try to logon with existing user it will say you don’t have an access. Here is a important note: you may try to access to this SAP Analytics Cloud, embedded edition tenant by your standard e-mail and password as you know that a single account of SAP Identity Service is used (by default for every and each SAP Analytics Cloud tenant). But even you have created the service (with the same SAP BTP e-mail account) SAP Analytics Cloud, embedded edition tenant have not yet your account pre-configured.
Note (thanks to Piotr, Tesny for comment below):
1. I will use an email which already has an access to a separate SAP Analytics Cloud instance.
2. In case you have no access to any SAP Analytics Cloud tenant after provisioning a user you should click on “Forgot Password” and receive a link on e-mail to setup a password.
3. If you have configured your own IdP tenant (MS AD, SAP IAS and etc.) for SAML authorization you need to manage new users in that IdP.
So SAP Analytics Cloud redirects us to SAP Identity Service login page
But we cant access it yet
2. Theoretical part. Difference between APIs for SAP Analytics Cloud, embedded edition and SAP Analytics Cloud
Here is a scheme which shows the difference in workflow between full-use Analytics Cloud and it’s reduced version. PDF file are available for printing here. Also some elements on these schemas have links to SAP Help.
As we can see the main differentiators are:
– we have additional tenant REST API endpoints
– there is no UX unavailable for some capabilities
– there is no some technical capabilities at all (data acquisition and so on)
There is a few UI access and you can log in only after a proper tenant setup and creating the first user (actually by default a system owner is being created but you can’t access it cause it is SAP technical user). So we will proceed and here is the scheme of our next actions.
Here time comes to refer the blog post SAP Analytics Cloud User and Team Provisioning SCIM API Best Practices and Sample Scripts where Matthew Show discloses best practices for SAC. I appreciate Matthew very much for his work. Based on it I was able to learn Postman and adapted his scripts for SAP Analytics Cloud, embedded edition. Also at the end I’ve decided to keep the same variable names to make Matthew’s Sample Scripts compatible with the environment we will use for SAP Analytics Cloud, embedded edition setup and management.
Please go to Setup section on SAP Wiki and install Postman according User’s Guide. You can download Matthew’s Sample Scripts, but you don’t need them now. Let’s proceed with tenant management (this part is not available for SAP Analytics Cloud enterprise/standalone).
3. Install Postman and SAP Analytics Cloud, embedded edition API tenant management
In this case select the latest one in drop-down option
Lets start with Postman and then go to setup process via API.
- Install Postman according the User Guide mentioned before
- Save Collections and Environment for SAP Analytics Cloud, embedded edition (it is also described in User’s Guide) from Github (a correct version has been updated 02/09/2021). Then import them to Postman. Open the Environment. Values are empty now (except 2 which inherited for compatibility).
- Lets open the file we saved on the 1st step and setup our environment.
- Make the next mapping of the fields and fill out the Postman’s environment with values by copy-paste
- So you should get something like this in Postman:
Save it an Close it to avoid conflict when new values will be received while your open window will still has empty value.
- Open imported collection “0001. SAC Embedded Tenant Management” and lets look what we have
- Token creation – this step in official help documentation called Authentication in section so now you can understand what URL and credentials you should take.
- OAuth addition – this step in official help documentation also called Authentication (in section Provision and Manage User Accounts…) You need to create it to have an access to user management APIs.
- Tenant configuration – it is an Endpoint to manage tenant (Help link) and receive ClientID and ClientSecret for OAuth Client.
These are the steps to implement our plan:
- Click Run Collection.
In opened window select the Environment and press Run.
- What is going on in background if you look at Help’s structure:
- Token creation – returns tenantaccesstoken to manage your tenant. Can be used for each /Tenant endpoint.
- OAuth addition – you create an OAuthClient to your SAP Analytics Cloud, embedded edition tenant which authorized to create users by API.
- Tenant configuration – you request configuration of your SAP Analytics Cloud, embedded edition tenant, where ClientID and ClientSecret for API access is generated and save these values to the Environment.
Here I used the variables names as they are used in Matthew’s SCIM API Sample Scripts. In fact they are named CliendID and ClientSecret in response for tenant’s configuration.
- The result of these requests is visible in Environment where Username/Password was filled with value, tenantaccesstoken was created and filled with value.
- Also in Postman you can open the Console and review log
- This is it for initial setup. Now you can access Endpoints for /Tenant management and /User and /Group management which will be described below.
4. Create a user via API and user management
- We already created an OAuth Client. It was made in the Step 2 of previous collection.
- We create another accesstoken. We can’t go directly to SAP Analytics Cloud, embedded edition endpoints cause we don’t have accesstoken to SCIM API.
- We use API endpoints to create a user.
SAP Analytics Cloud, embedded edition help (this page has links to SAP Analytics Cloud API endpoints) but doesn’t say you need to get the token which is different from tenantaccesstoken.
- Open the next collection “0002. SAC Embedded Create User”
- OAuth token create – create a new accesstoken
- Get Fetch – We got new x-csrf-token
- /User create – We created a new user
- /User GET – We requested info about existing users in the tenant
- Make changes to the body of the GET request “/Create User”:
- UserName – mandatory field. In my example I use an email. System automatically changes it to GivenName&familyName concatenation. You can create any name according to your template/ID.
- Email – mandatory field.
- Role – you have 2 options according the help page Assigning Roles to Users and Groups:
- Save and Run collection. You might want to select “Save response” to review them it in Console.
- Here what we see in Console.
- We got new accesstoken
- We got new x-csrf-token
- We created a new user
- We requested info about existing users in the tenant
- (Optional) Review response from the last request
We created user named ALEXEYDUGAROV with the role BI Admin. To manage this user via Endpoint /USER/<ID> you need to send request to this location.
Also there is a system owner (as in standard SAP Analytics Cloud tenant) which can’t be changed
- To maintain any parameters to Users or Groups please learn mentioned blog post SAP Analytics Cloud User and Team Provisioning SCIM API Best Practices and Sample Scripts by Matthew Show
5. Access to SAP Analytics Cloud, embedded edition in Chrome browser
Here I would like to stop.
What you have learned in Part I:
- How to use SAP BTP cockpit to create service (in our example it was SAP Analytics Cloud, embedded edition)
- How workflow look like when you are working with SAP Analytics Cloud, embedded edition. What APIs are available
- How to setup SAP Analytics Cloud, embedded edition tenant via Postman.
- How to create a user and what users roles are available.
I plan to continue this topic so please subscribe to get a notification. The next blog post (Part II) is planned to have the next agenda:
- Start SAP HANA Cloud service
- Development SAP HANA objects in SAP Business Application Studio service (actually, I will provide a link to the tutorials how to do it)
- create Table and data load
- create Calculation View
- create SAP HANA Analytics Adapter and configure it
- Configure SAP HANA Cloud user access and setup SSO
- Create a live connection to SAP HANA
- Create a Model based on live-connection.
Thanks for reading! Please comment below or contact me if you find any mistakes or errors or issues with an access to files.