
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.
(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.
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.
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.
com.google.gson
com.sap.db.jdbc
com.sap.hana.dp.agent
org.apache.commons.codec
org.apache.commons.logging*1.1.1.v201101211721
org.apache.felix.gogo.command
org.apache.felix.gogo.runtime
org.apache.felix.gogo.shell
org.eclipse.equinox.console
org.eclipse.equinox.security.win32.x86_64
org.eclipse.equinox.security
org.eclipse.osgi.util
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.
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.
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.
In this example the dplogin command was used and caused an error:
osgi> dplogin hana.amer.global.corp.sap 30015 system password
Connecting to database...
Connection successful
No Agent with the default name mylaptop.emea.global.corp.sap found in Hana, creating one for you using the IP address.
If the hostname should be used run the command dpupdateagenthostname next
create agent "mylaptop.emea.global.corp.sap" protocol 'TCP' host '10.16.94.83' port 5050
com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [403]: internal error: Cannot connect to agent: mylaptop.emea.global.corp.sap at 10.16.94.83:5050 Context: Cannot connect to hdbdpserver
So the error was "cannot connect to hdbdpserver" meaning that the Hana instance cannot contact Hana's dpserver process. When checking the process list of Hana it truly was not enabled so I did as described in Hana Adapter SDK - Setup
Another typical error at that point is "Agent cannot be found". The architecture is designed to make Hana the driving part. So when the create-agent SQL command is executed, it is Hana trying to contact the agent. If the agent hostname is unknown to Hana or there is a firewall, this will not work. The solution then is to use the IP address (which the dplogin command does by default), open up the firewall or switching to the https/cloud protocol using the dpagentconfig tool.
With that the agent and the adapters are known to Hana and can be used either using SQL commands like create-remote-source or the various UIs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
12 | |
11 | |
10 | |
10 | |
9 | |
8 | |
8 | |
8 | |
7 |