Quantcast
Channel: SCN : Blog List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 676

Hana Adapter SDK - The Open Source Adapters from Github

$
0
0

This post is part of an entire series

Hana Smart Data Integration - Overview

 

In order to import the adapters, the easiest method is using the Github for Windows application.

It is installed from here and provides a fairly simple to use interface for the normal git operations.

Once installed, the github web page with the Hana Native Adapter repository is opened

SAP/hana-native-adapters · GitHub

and by clicking on the Clone in Desktop button a local copy of the github repository is created.

https://help.github.com/assets/images/windows/repository/windows-clone-in-desktop.png

(see here for the official help page of github)

 

This is really just a local copy on the local disk drive with no side effect on the files located in github. The local files can be modified at will.

 

The last step is to go to Eclipse/Hana Studio and import the Existing Project into Workspace using the Files - Import menu item.

adapter sdk github 1.png


As example the HelloWorldAdapter2 can be imported as a first project.

This adapter has no dependencies to other libraries, so it can be started right away. A right click on the Project and selecting the Debug As - Debug Configurations popup menu item does open the next screen.

adapter sdk github 2.png

 

In this screen the AgentConfig Launch Configuration should be visible. If it is not, it can be imported as shown in the previous chapter, by import - Debug - LaunchConfiguration and pointing to the /ui directory of the installed agent.

As every adapter has its own dependencies, the required bundles have to be listed and can be validated if any are missing. But actually, that is quite simple.

  1. Deselect all from the Target Platform tree
  2. Click on the Add Required Bundles
  3. Check if all Bundles in the required version are available by hitting the Validate Bundles button.

 

If the Adapter SDK feature was added as described in the previous chapter and the individual libraries required by each adapter are present, the validation does not return any errors and the Adapter Agent can be started by hitting the Debug button.

 

adapter sdk github 3.png

 

Once started, the console window shows the current information of the running plugins.Using the Stop icon at the top of it, it can be stopped at any time.

adapter sdk github 4.png

 

With these steps the Adapter is running within the Eclipse environment but not known or connected to any Hana instance yet. Basically there are three ways to make the agent and adapter known to Hana.

  1. Execute the create-agent, create adapter etc commands from the SQL console in Hana.
  2. In the Agent install directory run the \configTool\dpagentconfigtool.exe application. It will talk to the Eclipse Agent via TCP and after connecting to Hana it will issue the required Hana commands for registering the agent and the adapters.
  3. In the Console run the command "dplogin hostname port username password". This will create/update the agent using the hostname as agent name and install all adapters started.

Viewing all articles
Browse latest Browse all 676

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>