Skip to Content
Author's profile photo Martin Pankraz

Custom SDK data source to get map extensions up and running in no time

It is about six weeks now that SAP released Design Studio 1.4 and herewith I would like to share my first experiences with the data source SDK. I was already in the process of thinking of workarounds to become independent of SAP backend systems for offline demo purposes. On that matter SAP made me huge gift for Christmas so to speak.

From the start of the maps extension development process, I wanted test and debug data that could easily be manipulated without switching to any Bex tools or SAP BW. The data source SDK is our chance to do that.

To get the relevant data from the backend system to initialize my first custom data source, I loaded a dashboard containing one of the ConVista maps extensions, the desired data source and finally used SAP scripting language to export the data into CSV (APPLICATION.export(ExportType.CSV)). Some minor cleaning later I had my first custom data source on display with a simple cross tab (find the simple cross tab in the SAP SDK examples).

sdk data source in cross tab.png

Figure 1: simple cross tab with custom data source

To mimic the expected structure for the maps extensions some more research need to be done. Therefore I used the browser developer tools to learn the actual structure of the JSON which the Design Studio framework sends to the maps extensions during run time. In particular I focused on the JSON arrays:

  • dimensions (holds descriptive metadata about rows and columns),
  • data and
  • tuples.

OSM_custom data source.png

Figure 2: OpenStreetMap using custom data source

The SAP example CSV data source serves as a basis for my own data source. I modified the defineDimensions function in the init block and loaded the tuples and the actual data array from an external JSON file. Unfortunately further metadata reduction was necessary because of a jetty form size restriction of 200,000. It is possible to change that parameter but keeping in mind that using the data source should be as easy as possible, this wasn’t the right way to go.

As a result you can now run the ConVista maps extensions in combination with my mapsexampledatasource out of the box without any SAP backend system attached. Find the data source in my GitHub repository:

Me and ConVista love the easy integration and the possibility to get an even quicker hands-on.


ConVista-ds-sdk-visualizations by MartinPankraz

Google Maps and OpenStreetMap component SDK development insights

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Mike Howles
      Mike Howles

      Great post Martin - Along with your previous maps post, too.  I had similar needs for some offline dummy data for my SDK components or demoing dashboards in an offline manner.  I used to just have a fallback dummy dataset in JSON for when there was no data bound to them but this of course meant I could not easily change the dummy data without modifying my SDK component.  Like you, I also was glad to see the datasource functionality in the 1.4 SDK.  I actually ended up writing a 'bring your own data' type of datasource where you can just paste in CSV and tell it how many fields are dimensions and it'll transform it for you.

      I also use this technique in my similar Open-Source Maps component so that I can not worry with live data ( Design Studio SDK (1.3/1.4) - Opensource SCN Maps (Part 1) if you are interested.)

      You are putting out some great stuff, would you be interested in collaborating on the SCN SDK team we have going?  (SCN Design Studio SDK Development Community)  Technical details of how we have it set up are here: ( SDK Development Community Git Repository (sdkpackage) )

      Hope to see much more from you soon!