System information: Operating system (distribution) and version win 10 x64 DBeaver version 6.2.4 Connection specification: Database name and version SAP Hana Describe the problem you're observing: Unique Key creation is impossible - when. All new connections to SAP HANA use this connection method by default, treating SAP HANA as a multi-dimensional source. In order to treat a connection to SAP HANA as a relational source, you must select File Options and settings Options, then check the box under Direct Query Treat SAP HANA as a relational source.
- Dbeaver Sap Hana Download
- Sap Hana Interview Questions
- Dbeaver Sap Hana
- Dbeaver Sap Hana Portal
- Dbeaver Sap Hana Login
Source https://blogs.sap.com/2020/04/20/secure-connection-from-dbeaver-to-sap-hana-cloud/
Dbeaver Sap Hana Download
SAP HANA Cloud…
… is the new cloud-native SAP HANA product, used in my previous post or in the recent live coding episode by Thomas Jung.
Two quick notes before we start:
- As of today, it is available only as a paid service in SAP Cloud Platform, but (usual disclaimer about forward-looking statement applies) the trial version should be available later this year.
- As a reminder, the IP address of a machine from which a DB client tries to connect to SAP HANA Cloud instance — should be whitelisted by your administrator.
Luckily, in my case, I am one of the admins of this SAP HANA Cloud instance. So, it is accessible from my IP addresses.
I need to grab the endpoint of my instance, which is:
2246ed61-81df-48e8-9711-323311f7613f.hana.prod-eu20.hanacloud.ondemand.com:443
.
Back to DBeaver…
…where you can notice two great things:
- SAP HANA is already included in the list available drivers and
- HANA JDBC driver
ngdbc
is downloaded automatically when required or updated. If needed, you can still point to a driver you might have pre-install on your machine already.
Let’s create a new connection.
So, I need to put Host and Port accordingly to the endpoint copied from my HANA Cloud instance cockpit. This will automatically populate the JDBC URL. Plus populate Username and Password fields. Ok, let’s Test Connection….
Sap Hana Interview Questions
“Receive of connect failed.
“? Why? Of course, you know, if you read the previous post ?
Dbeaver Sap Hana
Clients can establish only secure connections to SAP HANA Cloud!
Let’s add this encrypt
parameter to the connection. Unfortunately, this is where I found DBevaer UI somewhat unintuitive.
Switch to Driver properties and right-click on User Properties to add a new property.
Unfortunately, DBevar did not allow me to put encrypt=true
just right here. Instead, I added encrypt
property, and then (it took me half an hour to figure our) double-click next to my property in Value column to edit. Type true
there.
Ok, let’s Test Connection now…
Bingo! Now I can connect and work with my instance.
Here’s another obvious disclaimer.
Never use admin user, like DBAdmin
, to do your work!
Create separate users for admin or for development.
We are on MacOS… Have we missed anything?
Again, if you read the previous post, then you might remember that “DigiCert Global Root CA” root certificate was required to authenticate SAP HANA host to establish secure communication. And you might remember that on MacOS or Linix we had to explicitly use that certificate with HDBSQL.
What is different with DBeaver? It is a Java app and it is using the JDBC driver. The complete JRE is included in the DBeaver installation.
And by default JRE comes with the cacerts
store of root certificates. Let’s check.
Dbeaver Sap Hana Portal
Don’t you trust yet?
Personally, I certainly would like to double-check, if these assumptions are correct.
I have another Java installation on my Mac:
/usr/local/Cellar/openjdk/13.0.2+8_2/libexec/openjdk.jdk/Contents/Home
so let’s check if it can be used to provide the trustStore
property for our JDBC connection instead.
And what about Windows?
Well, not much different. You use the default JRE installed with DBeaver…
…or you can use cacerts
delivered in some other %JAVA_HOME%
, like with SAP JVM in my case. Public beta macos.
Looking for more information about JDBC?
There is a tutorial from https://people.sap.com/daniel.vanleeuwen available: Connect Using the SAP HANA JDBC Driver as a part of the tutorials mission Use Clients to Query an SAP HANA Database.
Trust me, I am an engineer.
-Vitaliy (aka @Sygyzmundovych)
Source https://blogs.sap.com/2020/01/08/good-things-come-together-dbeaver-sap-hana-spatial-beer/
Especially for those scenarios, but also for the data preparation of complex visualizations, it is handy to have a tool to do quick intermediate visualizations in order to check partial results or quickly do a feasibility check of the data. SQL and GIS (database) developers may be familiar with an open source client tool called DBeaver. DBeaver is a free universal database client with excellent built-in spatial datatype support. Since version 6.2.2 it offers support for SAP HANA and since version 6.3.1 the support of SAP HANA Spatial has been contributed.
This article should give a quick overview of how to use DBeaver with SAP HANA Spatial to get some quick map visualizations of database objects without using a full-blown GIS client software. As an example we are going to do a DBSCAN clustering on a beer garden dataset.
Yes, you caught me red-handed: I want to fool your mind and create positive associations!
If you do not have a SAP HANA instance at hand and would like to setup a free SAP HANA Express to load some spatial data, I recommend reviewing my previous blog post first:
Since DBeaver is actually an Eclipse plugin it runs on Windows, Mac and Linux (…and probably anywhere else where you manage to run Eclipse). The easiest way to install DBeaver is to download and execute the ready-made binaries.
https://dbeaver.io/download |
Alternatively you may also install the DBeaver plugin into your existing Eclipse installation, which I would only recommend if you have a good reason for doing this.
If you downloaded and installed the latest version, you have everything you need. SAP HANA (Spatial) support comes out of the box and there is no need to install a separate plugin.
When you open up DBeaver the first time, you will be presented with a dialogue to connect a new database.
You can also manually open this dialogue by clicking the plug sign on the upper left corner.
So, now let’s configure the connection to your SAP HANA instance. Switch to the ‘All’ tab on the left side and enter “HANA” as a search keyword. Select SAP HANA and click ‘Next’.
Dbeaver Sap Hana Login
Enter the connection details for your SAP HANA instance and click ‘Test Connection’:
When you first use a connection to SAP HANA the respective driver needs to be download. Don’t worry! DBeaver will do the job for you. Simply confirm the automatically suggested download by clicking ‘Download’.
After the download you should receive a message that the connection has been established. Confirm this message with ‘OK’ and click ‘Finish’ to add your instance to the DBeaver Database Navigator.
Now your are all set to use DBeaver with SAP HANA and – of course – SAP HANA Spatial in particular!
As an example, I am going to use Open Street Map POI (Point of Interest) data from Germany. The respective shape files can be downloaded from Geofabrik and imported using the built-in SAP HANA Shape File Import.
In my case, I imported all POI data into a table called GERMANY in schema GEOFABRIK. You can navigate to your spatial table in the Database Navigator by expanding your instance, the schema and the directory ‘Tables’.
For starters, let’s do a data preview on the table. Right-click your table and choose “Read data in SQL console”.
DBeaver will generate and execute an SQL statement selecting all columns and rows of the respective table. Of course, for performance reasons only the first 200 rows (depending on configuration) will be fetched by the client.
On the right side you will notice a tiled view with so called ‘Panels’. In the example above the cell ‘OSM_ID’ in row 1 is highlighted and the panel shows the details for this cell. Which in this case is simply the numerical ID. Now let’s get to the fun part and see what happens, when you highlight a cell of a spatial column (column ‘SHAPE’ in our example).
You will see the point on a map! Right in your database studio. On the map, you can navigate and zoom in and out. Furthermore, you have the possibility of choosing different map layers and switching between MapBox and OpenStreetMap. Take some time to play around and configure your favorite map. The point that I have chosen above is actually a ‘bench’ (column FCLASS) located at the Wandlitzsee. Sounds cozy, does it?
Benches? Right, we are interested in beer gardens. So we copy’n’paste the following statement into the SQL console and execute it.
Before executing I did increase the line limit to 5000 (instead of 200) at the bottom of the window to show all my 3313 entries.
On the left side of your screen you may have noticed a tab called ‘Spatial’. If we click this tab all entries of the result set will be visualized on a map. So here we go: Let’s have a look at all the OSM beer gardens in Germany.
Wait – here is little limitation, you will have to overcome. Whenever working on full result sets or calculated columns, you will have to explicitly define the Spatial Reference System you are using to get the data mapped on a map. To do that click on the dropdown item ‘Simple’ at the bottom of the screen and define the Spatial Reference System you are using. In my case this is SRS 3857.
(To be fair this is not a limitation of DBeaver but rather the SAP HANA integration piece)
After confirming the dialogue all entries will be shown on map. You can even select a single entry and see the details with a layover.
Even from looking at the picture above we can tell that there is a north/south slope for the density of beer gardens. Without being a Data Scientist, I can tell that this must be correlated to the slope in temperature and brewery density.
To confirm this visual impression with some more facts, we can do a density based DBSCAN clustering. To identify all the clusters, where there are more than 10 Biergartens in a 10km distance, we execute the following statement.
Please note that the cluster with ID 0 is the outlier cluster, which contains all points, which cannot be associated to a spatial cluster. More details about the DBSCAN and its parametrisation can be found in the SAP HANA Spatial Reference.
Highlighting the first three entries of the result set (ordered by number of items per cluster) with SHIFT + Mouseclick, we can quickly identify the clusters for Munich, Mannheim and Leipzig.
If the window appears too small, we may open up the same view in a browser by clicking the browser icon on the lower left of the map window.
Finally and not surprisingly we can see that Munich is essentially a dense cluster of beer gardens.
Cheers!
With the integration of SAP HANA Spatial into DBeaver, you do have a convenient database IDE, which offers excellent spatial support. The value is not to create sophisticated spatial visualizations, but rather the quick and easy possibility to get a visual impression of the data your are dealing with. If you are after sophisticated visualizations and deep insights, you should have a look into full-blown GIS clients, like Esri ArcGIS or QGIS.
Ah, forgot the most important conclusion: If you want to stumble from Biergarten to Biergarten you should visit Munich, Mannheim or Leipzig!