Skip to content

Commit 2336dde

Browse files
committed
updates to the hana cloud lake tutorials
1 parent 761fa0f commit 2336dde

File tree

15 files changed

+89
-63
lines changed

15 files changed

+89
-63
lines changed

tutorials/hana-cloud-dl-clients-dot-net/hana-cloud-dl-clients-dot-net.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ In order for the shell to recognize that the .NET SDK is installed and for any `
109109
pico Program.cs
110110
```
111111

112-
5. Replace the entire contents of `Program.cs` with the code below:
112+
5. Replace the entire contents of `Program.cs` with the code below. Update the host value in the connection string.
113113

114114
```C#
115115
using System;
@@ -162,11 +162,9 @@ In order for the shell to recognize that the .NET SDK is installed and for any `
162162
163163
Save and close the `Program.cs` file after replacing the code.
164164
165-
The above app makes use of some of the data lake Relational Engine .NET driver methods, such as [SAConnection](https://help.sap.com/docs/SAP_HANA_DATA_LAKE/a894a54d84f21015b142ffe773888f8c/3c0ff5b76c5f10148352aa573b2bc242.html). Connection details for this class can be found at [Connection Properties](https://help.sap.com/docs/SAP_HANA_DATA_LAKE/a894a54d84f21015b142ffe773888f8c/9da0c496b1cc4245bae5f9cadf98e5fc.html). See also the [.NET Driver](https://help.sap.com/docs/SAP_HANA_DATA_LAKE/a895964984f210158925ce02750eb580/aa95e60108104aac808272f210f52e19.html) in the SAP HANA Cloud, data Lake client interfaces guide. Further .NET API details can be found in the [.NET API browser](https://docs.microsoft.com/en-us/dotnet/api/?view=net-6.0).
165+
>The above app makes use of some of the data lake Relational Engine .NET driver methods, such as [SAConnection](https://help.sap.com/docs/SAP_HANA_DATA_LAKE/a894a54d84f21015b142ffe773888f8c/3c0ff5b76c5f10148352aa573b2bc242.html). Connection details for this class can be found at [Connection Properties](https://help.sap.com/docs/SAP_HANA_DATA_LAKE/a894a54d84f21015b142ffe773888f8c/9da0c496b1cc4245bae5f9cadf98e5fc.html). See also the [.NET Driver](https://help.sap.com/docs/SAP_HANA_DATA_LAKE/a895964984f210158925ce02750eb580/aa95e60108104aac808272f210f52e19.html) in the SAP HANA Cloud, data Lake client interfaces guide. Further .NET API details can be found in the [.NET API browser](https://docs.microsoft.com/en-us/dotnet/api/?view=net-6.0).
166166
167-
6. Update the host value in the connection string.
168-
169-
7. Run the app:
167+
6. Run the app.
170168
171169
```Shell
172170
dotnet run
Loading

tutorials/hana-cloud-dl-clients-golang/hana-cloud-dl-clients-golang.md

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,42 @@ go version
3131

3232
![go version linux](version2.png)
3333

34-
If Go is installed, then it will return the currently installed version, such as 1.19.
34+
If Go is installed, then it will return the currently installed version, such as 1.20.4
3535

3636
If it is not installed, download it from [Download Go](https://golang.org/dl/), run the installer, follow the provided instructions, and ensure that Go is in your path.
3737

38-
On Linux, follow the instructions for the appropriate Linux version such as the [Installing Go for openSUSE](https://en.opensuse.org/SDB:Go).
38+
On Linux, follow the instructions for the appropriate Linux version: [Installing Go for openSUSE](https://en.opensuse.org/SDB:Go).
3939

40-
>In order for the shell to recognize that Go has been installed and for any go commands in future steps to be recognized, a new shell window needs to be opened.
40+
>Note: A new shell window must be opened for the system to recognize the Go installation and for executing any future Go commands.
4141
4242
### Configure the environment
4343

44-
The data lake Relational Engine Client interface for Go, like the other data lake Relational Engine client interfaces, except for JDBC, makes use of a C library named SQLDBC. The Go driver loads the SQLDBC library named `libdbcapiHDB` using [`cgo`](https://golang.org/cmd/cgo/). For further information on the following steps, consult [Build the Go Driver](https://help.sap.com/docs/SAP_HANA_DATA_LAKE/a895964984f210158925ce02750eb580/0f3109338be048e187caa9646199e3db.html?state=DRAFT) in the SAP HANA Cloud, Data Lake Client Interfaces Reference Guide. In order to use the Go Driver, a 64-bit `gcc` compiler is required.
44+
The data lake Relational Engine Client interface for Go, like the other data lake Relational Engine client interfaces (except JDBC), makes use of a C library named SQLDBC.
45+
46+
The Go driver loads the SQLDBC library named `libdbcapiHDB` using [`cgo`](https://golang.org/cmd/cgo/). For further information on the following steps, consult [Build the Go Driver](https://help.sap.com/docs/SAP_HANA_DATA_LAKE/a895964984f210158925ce02750eb580/0f3109338be048e187caa9646199e3db.html?state=DRAFT) in the SAP HANA Cloud, Data Lake Client Interfaces Reference Guide. In order to use the Go Driver, a 64-bit `gcc` compiler is required.
4547

4648
1. To check if a 64-bit `gcc` compiler is installed, run the following command:
4749

4850
```Shell
4951
gcc --version
5052
```
5153

52-
For Windows (if it is not installed), it can be downloaded from [Download MinGW](https://www.mingw-w64.org/downloads/). Under **WinLibs.com**, you can install from [winlibs.com](https://winlibs.com/), by scrolling to the **Download** section and downloading the latest release version (UCRT runtime) of the ZIP archive for Win64 to install for the x86_64 architecture, and then extracting the folder.
54+
On Windows (if needed), download the compiler from [Download MinGW](https://www.mingw-w64.org/downloads/). Under **WinLibs.com**, follow the link to [winlibs.com](https://winlibs.com/), by navigating to the **Download** section. Find the latest release version of the Zip archive (UCRT runtime) for Win64 – x86_64. Then extract the folder.
5355

5456
![download minGW from WinLibs](winLibsMinGW.png)
5557

56-
If command prompt isn't showing you the installed version after running the version check command, manually add the bin folder to your path by setting it in your environment variables.
58+
If command prompt isn't displaying the installed version after running the version check command, manually add the `bin` folder to your path by setting it in your System environment variables.
59+
60+
>On Windows, search **Edit the System Environment Variables** and click on **Environment Variables...**.
61+
>
62+
![Edit Environment Variables](editEnvironmentVariables.png)
63+
64+
Look for the `Path` environment variable and double click to edit. Select **Browse** and manually browse through your File Explorer to find the bin folder
65+
66+
![Add bin to path](add-bin-to-path.png)
5767
58-
On Linux, install the System GNU C compiler for your version of Linux. Note that if you are using openSUSE, minGW is included in the installation for Go through YaST.
68+
On Linux, install the System GNU C compiler for your version of Linux.
69+
>Note: if you are using openSUSE, minGW is included in the installation for Go through YaST.
5970
6071
![gcc 64-bit](gccLinux.png)
6172
@@ -70,12 +81,10 @@ The data lake Relational Engine Client interface for Go, like the other data lak
7081
GOPATH is set to a location such as `C:\Users\user\go` or `$HOME/go` and defines the root of your workspace which stores your codebase.
7182
7283
3. Set the required environment variables.
73-
74-
On Windows, search **Edit the System Environment Variables** and click on **Environment Variables...**.
7584
76-
>Optionally, you can also use the **SETX** command in command prompt to set a Windows environment variable. For example, `SETX CGO_LDFLAGS C:\SAP\hdlclient\IQ-17_1\Bin64\dbcapi.dll`. Note that this will set a user variable, not a system variable.
85+
>On Windows, navigate to the start menu and search for **system** environment variables.
86+
Optionally, you can also use the **SETX** command in command prompt to set a Windows environment variable. For example, `SETX CGO_LDFLAGS C:\SAP\hdlclient\IQ-17_1\Bin64\dbcapi.dll`. Note that this will set a user variable, not a system variable.
7787
78-
![Edit Environment Variables](editEnvironmentVariables.png)
7988
8089
On Linux, open the .bash_profile
8190
@@ -85,7 +94,7 @@ The data lake Relational Engine Client interface for Go, like the other data lak
8594
8695
4. Set the `CGO_LDFLAGS` environment variable to point to the location of the HDLRE client library as shown below, and set the `LD_LIBRARY_PATH` if needed.
8796
88-
On Windows, add the **NEW** System Variable. Set the variable name to **CGO_LDFLAGS** and the variable value to the location of `dbcapi` library: `C:\SAP\hdlclient\IQ-17_1\Bin64\dbcapi.dll`
97+
On Windows, add a **NEW** System Variable. Set the variable name to **CGO_LDFLAGS** and the value as the location of `dbcapi` library: `C:\SAP\hdlclient\IQ-17_1\Bin64\dbcapi.dll`
8998
9099
![Set Environment Variables](setEnvVar.png)
91100
@@ -97,7 +106,7 @@ The data lake Relational Engine Client interface for Go, like the other data lak
97106
```
98107
![.bash_profile contents](bashProfileAfterCGO.png)
99108
100-
5. Go to the driver folder and create a go module.
109+
5. Navigate to the driver folder and create a Go module.
101110
102111
```Shell (Windows)
103112
cd C:\SAP\hdlclient\IQ-17_1\SDK\golang\SAP\go-hdlre\driver
@@ -120,7 +129,6 @@ The data lake Relational Engine Client interface for Go, like the other data lak
120129
mkdir %HOMEPATH%\DataLakeClientsTutorial\go
121130
cd %HOMEPATH%\DataLakeClientsTutorial\go
122131
notepad goQuery.go
123-
124132
```
125133
126134
```Shell (Linux)
@@ -147,7 +155,7 @@ The data lake Relational Engine Client interface for Go, like the other data lak
147155
148156
fmt.Println("Connect String is " + connectString)
149157
150-
db, err := sql.Open("hdb", connectString)
158+
db, err := sql.Open("hdlre", connectString)
151159
if err != nil {
152160
log.Fatal(err)
153161
return
@@ -197,12 +205,11 @@ The data lake Relational Engine Client interface for Go, like the other data lak
197205
198206
4. Add the code below to `go.mod` under the go 1.19 (version) line:
199207
200-
>Make sure the path to the driver folder is correct and make any necessary changes.
208+
>Make any necessary changes to ensure the path to the driver folder is correct.
201209
202210
```Code (Windows)
203211
replace SAP/go-hdlre/driver v0.1.0 => C:\SAP\hdlclient\IQ-17_1\SDK\golang\SAP\go-hdlre\driver
204212
require SAP/go-hdlre/driver v0.1.0
205-
206213
```
207214
208215
```Code (Linux)
@@ -248,7 +255,7 @@ Visual Studio Code provides plugins for Go and can be used to debug an applicati
248255

249256
Notice that the program stops running at the breakpoint that was set.
250257

251-
Observe the variable values in the leftmost pane. Step through code.
258+
Observe the variable values in the leftmost pane. Step through the code.
252259

253260
![Breakpoint](GoBreakpoint.png)
254261

Loading
Loading

tutorials/hana-cloud-dl-clients-jdbc/hana-cloud-dl-clients-jdbc.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ javac -version
4141

4242
If these commands fail, ensure that the folder they are located in is included in your path.
4343

44-
The following command will install Java on openSUSE Leap 15.2.
44+
The following command will install Java on openSUSE Leap 15.4.
4545

4646
```Shell (Linux)
4747
sudo zypper install java-11-openjdk-devel
@@ -77,7 +77,7 @@ See [JDBC Drivers](https://help.sap.com/viewer/a894a54d84f21015b142ffe773888f8c/
7777
pico JavaQuery.java
7878
```
7979

80-
2. Copy the following code into `JavaQuery.java`:
80+
2. Copy the following code into `JavaQuery.java`. Update the `host` value in the connection string.
8181

8282
```Java
8383
import java.sql.*;
@@ -117,9 +117,7 @@ See [JDBC Drivers](https://help.sap.com/viewer/a894a54d84f21015b142ffe773888f8c/
117117
}
118118
```
119119
120-
3. Update the `host` value in the connection string.
121-
122-
4. Compile the `.java` file into a `.class` file using the following command:
120+
3. Compile the `.java` file into a `.class` file using the following command:
123121
124122
```Shell (Microsoft Windows)
125123
javac -cp %IQDIR17%\Java\sajdbc4.jar;. JavaQuery.java
@@ -128,7 +126,7 @@ See [JDBC Drivers](https://help.sap.com/viewer/a894a54d84f21015b142ffe773888f8c/
128126
javac -cp $IQDIR17/java/sajdbc4.jar:. JavaQuery.java
129127
```
130128
131-
5. Run `JavaQuery.class` and indicate where the JDBC driver is located.
129+
4. Run `JavaQuery.class` and indicate where the JDBC driver is located.
132130
133131
```Shell (Microsoft Windows)
134132
java -classpath %IQDIR17%\Java\sajdbc4.jar;. JavaQuery
@@ -184,15 +182,21 @@ The following steps demonstrate how to configure `DBeaver` to connect to data la
184182
185183
![Install DBeaver](dbeaver-install1.png)
186184
187-
2. In `DBeaver`, select **Database | Driver Manager | New** to create a new driver configuration.
185+
2. In `DBeaver`, select **Database | Driver Manager | New** to create a new driver configuration. Name the driver **SAP HANA Cloud, data lake**
188186
189187
![New Driver](create-new-driver.png)
190188
191-
3. Under the **Libraries** tab, specify Java and native components that make up the driver.
189+
3. Under the **Libraries** tab, add Java and native components by clicking Add File.
190+
191+
![Libraries](create-new-drivers-libraries.png)
192+
193+
Press **OK** to save the new driver definition.
194+
195+
![Press OK](press-ok.png)
192196
193-
![Libraries](create-new-driver-libraries.png)
197+
Then edit the driver and select `sajdbc4.jar`. Choose Find Class and select the driver class.
194198
195-
Select `sajdbc4.jar` and choose Find Class and press **OK** to save the new driver definition.
199+
![Edit Driver library](edit-driver-class.png)
196200
197201
>On Linux, if an error occurs indicating that the library cannot load, ensure that source IQ.sh has been added to your environment as described at [Step 5: Install the data lake IQ client](hana-cloud-dl-clients-overview).
198202
@@ -203,7 +207,7 @@ The following steps demonstrate how to configure `DBeaver` to connect to data la
203207
5. Provide the JDBC URL and credentials and press the **Test Connection** button. An example of the URL is shown below.
204208
205209
```JDBC URL
206-
jdbc:sqlanywhere:uid=HDLADMIN;pwd=MyPasword1;Host=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX.iq.hdl.trial-XXXX.hanacloud.ondemand.com:443;ENC='TLS{tls_type=rsa;direct=yes}'
210+
jdbc:sqlanywhere:uid=USER1;pwd=Password1;Host=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX.iq.hdl.trial-XXXX.hanacloud.ondemand.com:443;ENC='TLS{tls_type=rsa;direct=yes}'
207211
```
208212
209213
![Database connection main tab](create-new-driver-test.png)
Loading

tutorials/hana-cloud-dl-clients-node/hana-cloud-dl-clients-node.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Ensure you have Node.js installed and check its version. Enter the following com
3131
node -v
3232
```
3333

34-
If Node.js is installed, the currently installed version is returned, such as v16.15.1.
34+
If Node.js is installed, the currently installed version is returned, such as v18.16.0.
3535

3636
If Node.js is not installed, download the long-term support (LTS) version of Node.js from [Download Node.js](https://nodejs.org/en/download/).
3737

@@ -160,7 +160,7 @@ In addition to the Node.js driver covered in this tutorial which is `@sap\iq-cli
160160
>node nodeQuery.js
161161
>```
162162
163-
>```Shell (Linux or Mac)
163+
>```Shell (Linux)
164164
>export DEBUG=*
165165
>node nodeQuery.js
166166
>```

tutorials/hana-cloud-dl-clients-odbc/hana-cloud-dl-clients-odbc.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ The ODBC Data Source Administrator can be used to view the installed ODBC driver
3030

3131
![start ODBC Administrator](start-odbc.png)
3232

33-
2. Click the **Drivers** tab and view the installed drivers.
33+
2. Click the **Drivers** tab and view the installed drivers. The SAP IQ driver is visible.
3434

3535
![odbc admin drivers](drivers-1.png)
3636

37-
The SAP IQ driver is visible.
37+
3838

3939
3. Click the **User DSN** tab to view the data sources.
4040

@@ -97,7 +97,7 @@ For additional details see [Connection Properties](https://help.sap.com/viewer/a
9797

9898
```.odbc.ini
9999
[HC_DL]
100-
driver=/home/dan/sap/dlclient/IQ-17_1/lib64/libdbodbc17.so
100+
driver=/home/XXXXX/sap/dlclient/IQ-17_1/lib64/libdbodbc17.so
101101
encryption=TLS(trusted_certificates=*;direct=yes)
102102
host=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.iq.hdl.XXXX-XXXX.hanacloud.ondemand.com:443
103103
integrated=NO
@@ -111,15 +111,25 @@ For additional details see [Connection Properties](https://help.sap.com/viewer/a
111111
isql -v HC_DL USER1 Password1
112112
```
113113

114-
DBISQL
114+
**DBISQL**
115+
116+
Some example queries you can run are listed below.
117+
118+
```SQL
119+
SELECT * FROM HOTEL.CUSTOMER;
120+
```
121+
122+
```SQL
123+
SELECT * FROM HOTEL.ROOM;
124+
```
115125

116126
![ODBC example with dbisql](ODBC-dbisql.png)
117127

118-
isql
128+
**isql**
119129

120130
![isql query](isql-query.png)
121131

122-
> To exit dbisql or isql type quit.
132+
> To exit dbisql or isql type `quit`.
123133

124134
> ---
125135

@@ -139,7 +149,6 @@ The following steps demonstrate how to use Microsoft Excel to query data in data
139149
1. Open Microsoft Excel.
140150

141151
2. In the **Data** tab, select **Get Data | From Other Sources | From ODBC**.
142-
143152
![Excel ODBC](ExcelODBC.png)
144153

145154
3. Select the previously created data source that contains the connection information to data lake Relational Engine.
Loading
Loading

0 commit comments

Comments
 (0)