Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
asim_munshi
Employee
Employee
Hello, This blog details the steps of using Google Looker to consume data from SAP DataSphere.

You can consume data exposed as views in  third-party clients, tools, and apps via the OData API

 



PreRequisites:


As a pre-requisite please familiarize yourself with and setup the consumption of SAP DataSphere data using APIs with Postman. Create a  VIEW in SAP DataSphere which you want to access the data from. Ensure that you can access the view’s data from Postman before moving ahead.

Create an instance of Looker using Google Cloud Console


setuplookerinstance


 

Looker does not provide the ability to connect to oData Services directly. Hence you have to use an intermediate service like Precog or Cdata to enable the connection

We used the  cdata Connect Cloud OData API.

Step 1: Datasphere Setup


Within DataSphere, set up an OAuth Client. Navigate to System–>Administration



 

Set the Callback URL to – http://localhost:33333/. This is required for cdata.

Grab the Authorization and token URLs too from this site. You will need them in the next steps.

 

Step 2: cdata Setup


Navigate to cdata Connect Cloud and setup a free trial

https://cloud.cdata.com/docs/Quick-Start-Guide.html

Navigate to your trial and setup a connection. Search for ‘oData’ and select it from the available 158 options



 

Enter the details as shown



Enter the URL at the individual VIEW level which gets you the data in postman. I was not able to get the ASSET URL to work which could have given me access to all views.

Clicking on Sign-in you should be prompted with a webpage asking for BTP Credentials. Once you enter those you should get logged in with a screen as shown



 

In case you get errors — make sure you entered the Callback URL correct when you setup the OAuth client in datasphere.

Save your connection.

Now Navigate to Dataexplorer on the left menu and make sure your view is visible and can be queried



 

Also generate and copy your personal access token(PAT).



Navigate to Settings by clicking the icon on top left right besides the username.

Click on AccessTokens and Create and copy the PAT.  This will be used as the password for connecting Looker to cdata.

This completes the connection & configuration on the cdata side.

 

Step 3: Looker Setup


Now Navigate to your Looker instance



 

Navigate to Admin–>Database–>connections and add a new connection



 

Enter the details as shown



note the port number and the host – enter as shown in the screenshot.

host: tcs.cdata.com

port: 14333

database: your cdata connection name from Step 2

Username: your cdata trial ’email’

Enter the Personal Access Token as the password.

Click on Test

You should see the below message on the top of the page if all is in order



Click Connect to create the connection.

Now it is time to explore and make sure we can get to the data of the exposed view

Click on Explore



 

 

 

Select the connection and the view underneath



 

 

 

 

 

 

 

 


 

Select desired columns and Run




That’s it!  Let me know in case of any questions!

Find out how to unleash the power of your business data with SAP’s free learning content on SAP Datasphere. It’s designed to help you enrich your data projects, simplify the data landscape, and make the most out of your investment. Check out even more role-based learning resources and opportunities to get certified in one place on  SAP Learning site.