Skip to Content

We’ve released the Data Access Extension SDK version 2 for Lumira 1.25 a while back and this is a short blog post to get you started with developing extensions using the sample extension we’ve published to GitHub. Let’s first download the sample extension repo from https://github.com/SAP/lumira-extension-da-sample which has all the files to get you started.

The sample extension is very simple(we know you’ll add the exciting stuff later!), it brings in data from a CSV file into a Lumira document. You can install the sample extension with the zip file present in the docs folder in the repo and the Extension Manager in Lumira. After a restart, the sample extension will be available along with the other data connectors in the Add New Dataset dialog box.

1.PNG

Let’s now take a quick look at what it can do. Select the extension in the list and press Next. This will take you to the UI screen where you can give the dataset a name, edit the path to the CSV file and the path to the metadata file. Samples of these files are available under docs\sample-data of the repo. Select OK and you are done importing the dataset into Lumira. You can also edit the metadata file to control which columns are imported as dimensions or measures with specific aggregation types into the Prepare room.

Now let’s setup our local development environment to get started with developing a data access extension. Check whether you have the JDK 7, update 75 and above installed or not. Download the Eclipse Luna IDE for Java EE developers and extract it to a directory.

Let’s now edit the batch file eclipse.bat present in the docs folder with the correct paths for ECLIPSE_HOME and JAVA_HOME and run it to launch Eclipse.

We’ll now build the Sample Extension from the repo we downloaded. Import the project repo we downloaded into eclipse and open the platform.target file. Select the “Set as target platform” at the top-right to set the target platform. Right click the export.xml file and select Run As > Ant Build to build the project. After a successful build, a new zip file to install the extension is created in the “target” folder.

/wp-content/uploads/2015/06/22_728475.png

To add a third-party jar to the extension project, place a copy of the jar in the “/lib” folder of the project. Add a line to include the jar in the “Bundle-Classpath” present in the “META-INF/manifest.mf” file. Ensure you don’t remove the “,.” at the end of this line. Now when you build the extension again, the jar file will be included along with the extension.

To quickly set you up with a new repo for your own extension, we included an executable that renames various assets using the name and package path you provide. Download a fresh copy of the sample extension repo and double click the rename-dae executable from the “docs” folder to run it. When prompted input your extension name without spaces and the desired package path without repeating the extension name again. You’ll can now import this project to develop your new data access extension project with the v2 SDK.

3.PNG

Let us know your thoughts and if there is anything you want us to add to help you develop data access extensions.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply