2

How to consume SAP DataSphere using Google Looker?

 1 year ago
source link: https://blogs.sap.com/2023/08/08/how-to-consume-sap-datasphere-using-google-looker/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
August 8, 2023 3 minute read

How to consume SAP DataSphere using Google Looker?

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

dsp_looker.png

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

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

OauthClient.png

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

cdata_connsetup.png

Enter the details as shown

cdata_connsetup_1.png

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

cdata_connsetup_2.png

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

cdata_connsetup_3.png

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

cdata_PAT.png

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

looker_admin1.png

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

looker_admin2.png

Enter the details as shown

looker_admin3-1.png

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

looker_admin4.png

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

looker_explore.png

Select the connection and the view underneath

looker_explore_1.png

Select desired columns and Run

dataspheredatainlooker.png

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK