Skip to content

Commit 912de1b

Browse files
update to dl client for windows
1 parent 7fb91c3 commit 912de1b

27 files changed

Lines changed: 204 additions & 71 deletions

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,13 @@ In order for the shell to recognize that the .NET SDK is installed and for any `
8282
</ItemGroup>
8383
```
8484

85-
Note that if the developer licensed version of the data lake Client was installed for Linux, the path might be similar to /home/dan/sap/hdlclient/sdk/dotnet/Sap.Data.SQLAnywhere.Core.v2.1.dll
85+
Note that if the developer licensed version of the data lake Client was installed the path might be similar to
86+
87+
```
88+
C:\SAP\hdlclient\sdk\dotnet\Sap.Data.SQLAnywhere.Core.v2.1.dll
89+
or
90+
/home/dan/sap/hdlclient/sdk/dotnet/Sap.Data.SQLAnywhere.Core.v2.1.dll
91+
```
8692

8793
![dotNET.csproj code](dotNET-csproj-code.png)
8894

1.76 KB
Loading

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

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ On Linux, follow the instructions for the appropriate Linux version: [Installing
4141
### Configure the environment
4242
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.
4343

44-
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 Go driver loads the SQLDBC library named `libdbcapiHDB` using [cgo](https://golang.org/cmd/cgo/). For further information on the following steps, consult [Go (golang) Driver](https://help.sap.com/docs/hana-cloud-data-lake/client-interfaces/go-golang-driver) 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.
4545

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

@@ -77,7 +77,7 @@ The Go driver loads the SQLDBC library named `libdbcapiHDB` using [cgo](https:/
7777
7878
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.
7979
80-
3. 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.
80+
3. Set the `CGO_LDFLAGS` environment variable to point to the location of the HDLRE client library as shown below.
8181
8282
On Windows, add a **NEW** variable. Set the variable name to **CGO_LDFLAGS** and the value as the location of `dbcapi` library: `C:\SAP\dlclient\IQ-17_1\Bin64\dbcapi.dll`
8383
@@ -90,15 +90,14 @@ The Go driver loads the SQLDBC library named `libdbcapiHDB` using [cgo](https:/
9090
9191
```Shell (Linux)
9292
echo $LD_LIBRARY_PATH
93-
echo $CGO_LDFLAGS
9493
pico .bash_profile
9594
```
9695
9796
```Shell (Linux)
98-
export LD_LIBRARY_PATH=$HOME/sap/dlclient/IQ-17_1/lib64
99-
export LD_LIBRARY_PATH=$HOME/sap/hdlclient/lib64
10097
export CGO_LDFLAGS=$HOME/sap/dlclient/IQ-17_1/lib64/libdbcapi_r.so
10198
export CGO_LDFLAGS=$HOME/sap/hdlclient/lib64/libdbcapi_r.so
99+
export LD_LIBRARY_PATH=$HOME/sap/dlclient/IQ-17_1/lib64
100+
export LD_LIBRARY_PATH=$HOME/sap/hdlclient/lib64
102101
```
103102
![.bash_profile contents](bashProfileAfterCGO.png)
104103
@@ -121,7 +120,7 @@ The Go driver loads the SQLDBC library named `libdbcapiHDB` using [cgo](https:/
121120
### Create a Go application that queries an SAP data lake Relational Engine
122121
1. In a shell, create a folder named `go`, enter the newly created directory, and open a file named `goQuery.go` in an editor.
123122
124-
```Shell (Microsoft Windows)
123+
```Shell (Windows)
125124
mkdir %HOMEPATH%\DataLakeClientsTutorial\go
126125
cd %HOMEPATH%\DataLakeClientsTutorial\go
127126
notepad goQuery.go
@@ -201,10 +200,11 @@ The Go driver loads the SQLDBC library named `libdbcapiHDB` using [cgo](https:/
201200
202201
4. Add the code below to `go.mod` under the go 1.23.4 (version) line:
203202
204-
>Make any necessary changes to ensure the path to the driver folder is correct.
203+
>Ensure you have the correct path to the driver folder. The path depends on your installation. Note that two example locations are provided. Choose the one that's closest to your installation and edit it if necessary.
205204

206205
```Code (Windows)
207206
replace SAP/go-hdlre/driver v0.1.0 => C:\SAP\dlclient\IQ-17_1\SDK\golang\SAP\go-hdlre\driver
207+
replace SAP/go-hdlre/driver v0.1.0 => C:\SAP\hdlclient\sdk\golang\SAP\go-hdlre\driver
208208
require SAP/go-hdlre/driver v0.1.0
209209
```
210210

@@ -216,12 +216,17 @@ The Go driver loads the SQLDBC library named `libdbcapiHDB` using [cgo](https:/
216216

217217
![go.mod contents](goModContents.png)
218218

219-
5. Run the application:
219+
5. Run the application or build and run the application:
220220

221221
```Shell
222222
go run goQuery.go
223223
```
224224

225+
```Shell Microsoft Windows
226+
go build goQuery.go
227+
goQuery.exe
228+
```
229+
225230
![Result](results.png)
226231

227232
For more information on the API's used, consult the SAP HANA Cloud, data lake connection specific properties at [Connect from Go to Data Lake Relational Engine](https://help.sap.com/docs/SAP_HANA_DATA_LAKE/a895964984f210158925ce02750eb580/0b55e305d26941c191c71eaa07f72bb5.html), [Go Database/SQL Tutorial](http://go-database-sql.org/index.html), and [Package SQL](https://golang.org/pkg/database/sql/)

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ primary_tag: software-product-function>sap-hana-cloud--data-lake
2121
---
2222

2323
### Install a JDK
24-
Ensure that you have a Java Development Kit (JDK) installed and make sure it is accessible from your path. Details of the driver and supported versions can be found at [JDBC Drivers](https://help.sap.com/viewer/a894a54d84f21015b142ffe773888f8c/latest/en-US/3bd02ce86c5f101482b78476939fb83a.html) and [Oracle Java SE Support Roadmap](https://www.oracle.com/java/technologies/java-se-support-roadmap.html).
24+
Ensure that you have a Java Development Kit (JDK) installed and make sure it is accessible from your path. Further details of the driver can be found at [JDBC Driver](https://help.sap.com/docs/hana-cloud-data-lake/client-interfaces/jdbc-driver).
2525

2626
An OpenJDK from SAP is available at [SapMachine](https://sap.github.io/SapMachine/#download).
2727

@@ -34,15 +34,15 @@ javac -version
3434

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

37-
The following command will install Java on openSUSE Leap 15.4.
37+
For Linux, the following command will install Java on openSUSE Leap 15.4.
3838

3939
```Shell (Linux)
4040
sudo zypper install java-11-openjdk-devel
4141
```
4242

4343

4444
### The data lake Relational Engine JDBC driver
45-
The data lake Relational Engine JDBC driver is a type 2 driver, which means it has a native (non-Java) component. For additional details see [Type 2 driver – Native-API driver](https://en.wikipedia.org/wiki/JDBC_driver#Type_2_driver_%E2%80%93_Native-API_driver). The driver is located in `%IQDIR17%\Java\sajdbc4.jar` on Microsoft Windows and `$IQDIR17/java/sajdbc4.jar` on Linux. The native component is at `%IQDIR17%\Bin64\dbjdbc17.dll` on Microsoft Windows and `$IQDIR17\lib64\libdbjdbc17.so` on Linux.
45+
The data lake Relational Engine JDBC driver is a type 2 driver, which means it has a native (non-Java) component. For additional details see [Type 2 driver – Native-API driver](https://en.wikipedia.org/wiki/JDBC_driver#Type_2_driver_%E2%80%93_Native-API_driver). The driver is located in `%IQDIR17%\java\sajdbc4.jar` on Microsoft Windows and `$IQDIR17/java/sajdbc4.jar` on Linux. The native component is at `%IQDIR17%\Bin64\dbjdbc17.dll` on Microsoft Windows and `$IQDIR17\lib64\libdbjdbc17.so` on Linux.
4646

4747
See [data lake Relational Engine JDBC driver](https://help.sap.com/docs/hana-cloud-data-lake/developer-guide-for-data-lake-relational-engine/jdbc-drivers) for additional details.
4848

@@ -104,7 +104,7 @@ See [data lake Relational Engine JDBC driver](https://help.sap.com/docs/hana-clo
104104
}
105105
```
106106
107-
3. Compile the `.java` file into a `.class` file using the following command:
107+
3. Save and close `JavaQuery.java`. Compile the `.java` file into a `.class` file using the following command:
108108
109109
```Shell (Microsoft Windows)
110110
javac -cp %IQDIR17%\Java\sajdbc4.jar;. JavaQuery.java

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

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Ensure you have Node.js installed and check its version. Enter the following com
2929
node -v
3030
```
3131

32-
If Node.js is installed, the currently installed version is returned, such as v20.10.0.
32+
If Node.js is installed, the currently installed version is returned, such as v22.16.0.
3333

34-
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/).
34+
If Node.js is not installed, download the long-term support (LTS) version of the Node.js installer from [Download Node.js](https://nodejs.org/en/download/).
3535

3636
>If an install for Node.js is not provided on Linux, you may choose to install it via a package manager. For more details, please navigate to [this link](https://nodejs.org/en/download/package-manager/).
3737
@@ -44,6 +44,11 @@ If Node.js is not installed, download the long-term support (LTS) version of Nod
4444

4545
### Install the data lake Relational Engine client for Node.js
4646
The Node.js driver covered in this tutorial is `@sap\iq-client` which supports the latest Node.js versions and includes a promise library. An alternate driver is the [SQL Anywhere](https://github.com/sqlanywhere/node-sqlanywhere) driver.
47+
The SQL Anywhere driver can be installed by running this command.
48+
49+
```Shell (Microsoft Windows)
50+
npm install sqlanywhere
51+
```
4752

4853
1. Add the dependencies to the driver.
4954

@@ -57,7 +62,7 @@ The Node.js driver covered in this tutorial is `@sap\iq-client` which supports t
5762
npm install
5863
```
5964

60-
2. Create a folder named `node` and enter the newly created directory.
65+
2. Open a new Shell and create a folder named `node` and enter the newly created directory.
6166

6267
```Shell (Microsoft Windows)
6368
mkdir %HOMEPATH%\DataLakeClientsTutorial\node
@@ -112,7 +117,7 @@ The Node.js driver covered in this tutorial is `@sap\iq-client` which supports t
112117
const { PerformanceObserver, performance } = require('perf_hooks');
113118
var t0;
114119
var util = require('util');
115-
var datalakeIQ = require('@sap/iq-client');
120+
var datalakeRE = require('@sap/iq-client');
116121
117122
var connOptions = {
118123
host: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX.iq.hdl.trial-XXXX.hanacloud.ondemand.com:443',
@@ -122,7 +127,7 @@ The Node.js driver covered in this tutorial is `@sap\iq-client` which supports t
122127
};
123128
124129
//Synchronous example querying a table
125-
var connection = datalakeIQ.createConnection();
130+
var connection = datalakeRE.createConnection();
126131
connection.connect(connOptions);
127132
128133
var sql = 'select TITLE, FIRSTNAME, NAME from HOTELS.CUSTOMER;';
@@ -146,7 +151,7 @@ The Node.js driver covered in this tutorial is `@sap\iq-client` which supports t
146151
147152
Two examples showing the drivers methods being used asynchronously are shown in the next two steps.
148153
149-
>To enable debug logging of the SAP IQ Node.js client, enter the following command and then rerun the app.
154+
>To enable debug logging of the Node.js client, enter the following command and then rerun the app.
150155
151156
>```Shell (Microsoft Windows)
152157
>set DEBUG=*
@@ -200,7 +205,7 @@ Asynchronous programming enables non-blocking code execution which is demonstrat
200205
const { PerformanceObserver, performance } = require('perf_hooks');
201206
var t0;
202207
var util = require('util');
203-
var datalakeIQ = require('@sap/iq-client');
208+
var datalakeRE = require('@sap/iq-client');
204209
205210
var connOptions = {
206211
host: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX.iq.hdl.trial-XXXX.hanacloud.ondemand.com:443',
@@ -210,7 +215,7 @@ Asynchronous programming enables non-blocking code execution which is demonstrat
210215
};
211216
212217
//Asynchronous example calling a stored procedure with callbacks
213-
var connection = datalakeIQ.createConnection();
218+
var connection = datalakeRE.createConnection();
214219
215220
connection.connect(connOptions, function(err) {
216221
if (err) {
@@ -296,7 +301,7 @@ The Node.js driver for the data lake Relational Engine client provides support f
296301
const { PerformanceObserver, performance } = require('perf_hooks');
297302
var t0;
298303
var util = require('util');
299-
var datalakeIQ = require('@sap/iq-client');
304+
var datalakeRE = require('@sap/iq-client');
300305
var PromiseModule = require('@sap/iq-client/extension/Promise.js');
301306
302307
var connOptions = {
@@ -308,7 +313,7 @@ The Node.js driver for the data lake Relational Engine client provides support f
308313
};
309314
310315
//Asynchronous example calling a stored procedure that uses the promise module
311-
var connection = datalakeIQ.createConnection();
316+
var connection = datalakeRE.createConnection();
312317
var statement;
313318
314319
PromiseModule.connect(connection, connOptions)
@@ -379,7 +384,7 @@ The Node.js driver for the data lake Relational Engine client provides support f
379384
380385
381386
### Debug the application
382-
Visual Studio Code can run and debug a Node.js application. It is a lightweight but powerful source code editor which is available on Windows, macOS and Linux.
387+
Visual Studio Code can run and debug a Node.js application. It is a lightweight but powerful source code editor which is available on Windows, macOS and Linux. Ensure that Node.js is added to your path in environment variables such as C:\Program Files\nodejs.
383388
384389
1. If required, download [Visual Studio Code.](https://code.visualstudio.com/Download).
385390
@@ -397,6 +402,13 @@ Visual Studio Code can run and debug a Node.js application. It is a lightweight
397402
398403
![VS Code Debugging](debugging.png)
399404
405+
If "Can't find Node.js binary 'node': path does not exist" error pops up, open a Shell and run the following command.
406+
```Shell
407+
code .
408+
```
409+
Then restart VSCode.
410+
411+
400412
### Knowledge check
401413
Congratulations! You have created and debugged a Node.js application that connects to and queries an SAP data lake Relational Engine database.
402414
38.5 KB
Loading
51.3 KB
Loading
77.3 KB
Loading
89.6 KB
Loading

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The ODBC Data Source Administrator can be used to view the installed ODBC driver
3939

4040
![Add ODBC user data source](ODBC-add.png)
4141

42-
5. Select **SAP IQ** and click **Finish**.
42+
5. Select **SAP HANA Cloud, data lake Relational Engine** and click **Finish**.
4343

4444
![New data source](Create-new-data-source-1.png)
4545

0 commit comments

Comments
 (0)