Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
i033659
Advisor
Advisor
1,183
Meanwhile SAP HANA and its spatial features can be used with a lot of third party GIS (Geographical Information Systems) tools. One crucial question is on how to connect SAP HANA with these tools. This might be quite different from tool to tool and sometimes also be kind of hidden information, especially when the possibility and support for a certain tool is new and recent. In this blog I go into the details how to connect SAP HANA with GeoServer.

SAP HANA can be used in GeoServer as data store. http://docs.geotools.org/latest/userguide/library/jdbc/hana.html describes in some sense that this is possible. We will give the details in this blog for an MS Windows 10 environment and GeoServer 2.15.0.

Deploy the HANA Plug-In for GeoServer: Go to https://mvnrepository.com/artifact/org.geotools.jdbc/gt-jdbc-hana/21.0 and click the button right beside "Files" to download the file gt-jdbc-hana-21.0.jar.



Copy the file gt-jdbc-hana-21.0.jar to the directory ...\GeoServer 2.15.0\webapps\geoserver\WEB-INF\lib of the GeoServer installation.



Having done this also the HANA JDBC ngdbc.jar driver has to be copied into the same directory.



You can find ngdbc.jar in the directory C:\Program Files\SAP\hdbclient of the hdbclient installation of your environment.

After having done this restart the geoServer and you will find SAP HANA as further possible vector data source in the Geo Server under Stores --> Add new store:



Define the Vector Data Source for SAP HANA: We will only describe the connection parameters to a HANA database when creating a store in GeoServer. As a prerequisite you also need to have already a workspace. For details how to create workspaces and general tutorials for GeoServer see e.g. https://geoserver.geo-solutions.it/edu/en/.

In a multi-tenant environment you have to state the name of the tenant database and the instance number at the bottom of the entry mask. Mind that alternatively it does NOT work to use the SQL-Port of the respective tenant and leaving the database empty. The field port is mandatory, but it is not considered. The remaining connection parameters should be pretty clear.

      

In this example my tenant database is called SPL and there is a database schema called HACKT25.

You may now create a new layer in the GeoServer via Layers --> Add a new layer and cross-check of what you see here with what you have in your remote HANA database.



 

In conclusion we see that the main parts are finding the place where to download the right Hana plug-in and second to figure out what is asked by the connection properties of the data store in GeoServer.
2 Comments