Hana Adapter SDK – Setup
This post is part of an entire series
- Hana Smart Data Integration – Adapters
- Hana Smart Data Integration – Batch Dataflows
- Hana Smart Data Integration – Realtime Table Replication
- Hana Smart Data Integration – Realtime Sources with Transformations
- Hana Smart Data Integration – Realtime Sources with History Preserving
- Hana Smart Data Integration – Architecture
- Hana Smart Data Integration – Fun with Transformation Services
In order to write new Adapters three things are needed
- A Hana instance with the Data Provisioning Server turned on
- Eclipse or Hana Studio (preferred)
- The Adapter SDK plugin for Eclipse/Hana Studio
Enabling the DPServer in the Hana Instance
The first step is done as database administrator by opening the Administration screen of the Hana instance.
In case the dpserver does not show up there, the configuration tab allows to turn it on (Hana SPS09 or higher).
Eclipse or Hana Studio
If Java SDK 1.7 is installed, the Hana Studio allows to open the Java perspective to develop new Java programs. The Adapter is just yet another Java program based on a couple of interfaces and classes, the Adapter SDK.
The main advantage of using Hana Studio is that SQL commands can be sent to Hana and breakpoints within the adapter being defined in one application. But nothing wrong in using a plain Eclipse installation instead.
Adding the Eclipse Plugin for the Adapter SDK
Currently the Adapter SDK is part of the data provisioning agent download, found in service marketplace.
There the various versions for the different Hana releases can be found, the last line is for the latest Hana revision – here Hana SPS10 with the matching SDI 1.00.01 version.
After uncompressing the downloaded SAR file and running the hdbsetup.exe file, a target directory is to be defined and other settings in the next screen.
NOTE: After the installation locate the Agent and disable it permanently. We do not want to use the agent with preconfigured adapters, but as part of the development environment.
With all components available in this directory, the Adapter SDK can be installed from the “ui” subdirectory, in above installation the c:\apps\dataprovagent\ui folder.
In Eclipse or Hana Studio, the menu item Help -> Install New Software, allows to add a local directory as new repository.
In this “ui” directory the Data Provisioning Framework and can be selected for installation.
Once this is installed and the application restarted, a new plugin project can be created, one per adapter. The details are described in the Adapter SDK document found in help.sap.com.
It says there:
- In SAP HANA studio, open the Plug-in Development perspective ( ).
- Right-click in the Package Explorer white space and select .
- Enter a project name such as HelloWorldAdapter.
- For Target Platform, select an OSGi framework: Equinox and click Next.
- Optionally change the Execution Environment depending on your adapter code.
- In the Templates dialog, select Data Provisioning Adapter Wizard and click Finish.
In case the Data Provisioning Adapter Wizard is not shown in step 6, make sure the step 4 was done – setting the target platform to Equinox.
The last step is to import the Adapter launch configuration, which is needed to start an adapter within Eclipse.
In the File -> Import dialog under the item Run/Debug a Launch Configuration can be imported from the same “ui” directory.