Getting ESG metrics from SAP Sustainability Control Tower
Extending my sustainability metrics
I’ve been anxiously waiting on the API Integration feature from SAP Sustainability Control Tower (SCT) and with their 2023/04 release, I can finally start blending those sustainability metrics within SCT with the eGRID emissions factor data I have already stored in my SAP Datasphere.
However, there were a few hoops that I needed to jump through to get these systems connected.
Setting up my new entitlement
First up, I had to ensure that the new sct-service-api entitlement was allocated to my BTP subaccount. (This is also referred to later as the Instance as opposed to the Application that I already had installed).
I added this to the subaccount where I had SCT installed, but I also had to enable Cloud Foundry.
Creating a Cloud Foundry space to install the SCT Instance
Next, from that same subaccount, I had to create a cloud foundry space that would run this new instance.
With that complete, I created a new SCT instance from the Service Marketplace and set the Runtime Environment to the Cloud Foundry space above.
Once I saw the instance created in the subscriptions portion of my subaccount, it was simply a matter of creating a Service Key for that instance. (You can add Binding Parameters here as well, but I did not.)
From this newly created service key, I grabbed the clientID, clientsecret as well as the url which I would be using later in my SAP Datasphere connection.
Onward to SAP Datasphere connections
Finally, I turned my attention to SAP Datasphere where I created a connection in the same space as my eGRID emission factors data. Using the Generic OData connection type, I created this connection using the information available on SAP Business Accelerator Hub and the SCT instance above.
- The URL that I used in the Connection Detail was: https://sct.sustainability.cloud.sap/api/sct-analytics-service/v1/sustainabilityMetrics
- The OAuth Token Endpoint is just the url from the service key with /oauth/token added to the end; the Client ID, and Client Secret are directly as copied
Time to explore!
Now within my SAP Datasphere data builder, I had access to all of the exposed metrics from the SCT package so I could start creating remote tables.
This OData connection can also be made directly within SAP Analytics Cloud but for me, it’s time to make some creative views on SAP Datasphere! For one, it’s a great staging area to blend and curate the data, and two, I can use the persistency feature that is native to Datasphere views to reduce the latency between my model’s data center and SCT’s data center.
Thanks for the blog, it's really helpful.
Thanks for the detailed blog, Chris.