diff --git a/tutorials/hana-cloud-dl-clients-dot-net/hana-cloud-dl-clients-dot-net.md b/tutorials/hana-cloud-dl-clients-dot-net/hana-cloud-dl-clients-dot-net.md index 0a18d42221..de6bcc4eaf 100644 --- a/tutorials/hana-cloud-dl-clients-dot-net/hana-cloud-dl-clients-dot-net.md +++ b/tutorials/hana-cloud-dl-clients-dot-net/hana-cloud-dl-clients-dot-net.md @@ -82,7 +82,13 @@ In order for the shell to recognize that the .NET SDK is installed and for any ` ``` - 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 + Note that if the developer licensed version of the data lake Client was installed the path might be similar to + + ``` + C:\SAP\hdlclient\sdk\dotnet\Sap.Data.SQLAnywhere.Core.v2.1.dll + or + /home/dan/sap/hdlclient/sdk/dotnet/Sap.Data.SQLAnywhere.Core.v2.1.dll + ``` ![dotNET.csproj code](dotNET-csproj-code.png) diff --git a/tutorials/hana-cloud-dl-clients-golang/add-bin-to-path.png b/tutorials/hana-cloud-dl-clients-golang/add-bin-to-path.png index d945898683..3eb321fb9a 100644 Binary files a/tutorials/hana-cloud-dl-clients-golang/add-bin-to-path.png and b/tutorials/hana-cloud-dl-clients-golang/add-bin-to-path.png differ diff --git a/tutorials/hana-cloud-dl-clients-golang/hana-cloud-dl-clients-golang.md b/tutorials/hana-cloud-dl-clients-golang/hana-cloud-dl-clients-golang.md index acc405b76f..7bb67151b3 100644 --- a/tutorials/hana-cloud-dl-clients-golang/hana-cloud-dl-clients-golang.md +++ b/tutorials/hana-cloud-dl-clients-golang/hana-cloud-dl-clients-golang.md @@ -41,7 +41,7 @@ On Linux, follow the instructions for the appropriate Linux version: [Installing ### Configure the environment 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. -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. +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. 1. To check if a 64-bit `gcc` compiler is installed, run the following command: @@ -77,7 +77,7 @@ The Go driver loads the SQLDBC library named `libdbcapiHDB` using [cgo](https:/ 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. -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. +3. Set the `CGO_LDFLAGS` environment variable to point to the location of the HDLRE client library as shown below. 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` @@ -90,15 +90,14 @@ The Go driver loads the SQLDBC library named `libdbcapiHDB` using [cgo](https:/ ```Shell (Linux) echo $LD_LIBRARY_PATH - echo $CGO_LDFLAGS pico .bash_profile ``` ```Shell (Linux) - export LD_LIBRARY_PATH=$HOME/sap/dlclient/IQ-17_1/lib64 - export LD_LIBRARY_PATH=$HOME/sap/hdlclient/lib64 export CGO_LDFLAGS=$HOME/sap/dlclient/IQ-17_1/lib64/libdbcapi_r.so export CGO_LDFLAGS=$HOME/sap/hdlclient/lib64/libdbcapi_r.so + export LD_LIBRARY_PATH=$HOME/sap/dlclient/IQ-17_1/lib64 + export LD_LIBRARY_PATH=$HOME/sap/hdlclient/lib64 ``` ![.bash_profile contents](bashProfileAfterCGO.png) @@ -121,7 +120,7 @@ The Go driver loads the SQLDBC library named `libdbcapiHDB` using [cgo](https:/ ### Create a Go application that queries an SAP data lake Relational Engine 1. In a shell, create a folder named `go`, enter the newly created directory, and open a file named `goQuery.go` in an editor. - ```Shell (Microsoft Windows) + ```Shell (Windows) mkdir %HOMEPATH%\DataLakeClientsTutorial\go cd %HOMEPATH%\DataLakeClientsTutorial\go notepad goQuery.go @@ -201,10 +200,11 @@ The Go driver loads the SQLDBC library named `libdbcapiHDB` using [cgo](https:/ 4. Add the code below to `go.mod` under the go 1.23.4 (version) line: - >Make any necessary changes to ensure the path to the driver folder is correct. + >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. ```Code (Windows) replace SAP/go-hdlre/driver v0.1.0 => C:\SAP\dlclient\IQ-17_1\SDK\golang\SAP\go-hdlre\driver + replace SAP/go-hdlre/driver v0.1.0 => C:\SAP\hdlclient\sdk\golang\SAP\go-hdlre\driver require SAP/go-hdlre/driver v0.1.0 ``` @@ -216,12 +216,17 @@ The Go driver loads the SQLDBC library named `libdbcapiHDB` using [cgo](https:/ ![go.mod contents](goModContents.png) -5. Run the application: +5. Run the application or build and run the application: ```Shell go run goQuery.go ``` + ```Shell Microsoft Windows + go build goQuery.go + goQuery.exe + ``` + ![Result](results.png) 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/) diff --git a/tutorials/hana-cloud-dl-clients-jdbc/hana-cloud-dl-clients-jdbc.md b/tutorials/hana-cloud-dl-clients-jdbc/hana-cloud-dl-clients-jdbc.md index 0581389596..c5816bed13 100644 --- a/tutorials/hana-cloud-dl-clients-jdbc/hana-cloud-dl-clients-jdbc.md +++ b/tutorials/hana-cloud-dl-clients-jdbc/hana-cloud-dl-clients-jdbc.md @@ -21,7 +21,7 @@ primary_tag: software-product-function>sap-hana-cloud--data-lake --- ### Install a JDK -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). +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). An OpenJDK from SAP is available at [SapMachine](https://sap.github.io/SapMachine/#download). @@ -34,7 +34,7 @@ javac -version If these commands fail, ensure that the folder they are located in is included in your path. -The following command will install Java on openSUSE Leap 15.4. +For Linux, the following command will install Java on openSUSE Leap 15.4. ```Shell (Linux) sudo zypper install java-11-openjdk-devel @@ -42,7 +42,7 @@ sudo zypper install java-11-openjdk-devel ### The data lake Relational Engine JDBC driver -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. +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. 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. @@ -104,7 +104,7 @@ See [data lake Relational Engine JDBC driver](https://help.sap.com/docs/hana-clo } ``` -3. Compile the `.java` file into a `.class` file using the following command: +3. Save and close `JavaQuery.java`. Compile the `.java` file into a `.class` file using the following command: ```Shell (Microsoft Windows) javac -cp %IQDIR17%\Java\sajdbc4.jar;. JavaQuery.java diff --git a/tutorials/hana-cloud-dl-clients-node/hana-cloud-dl-clients-node.md b/tutorials/hana-cloud-dl-clients-node/hana-cloud-dl-clients-node.md index 9066a67a47..fdcec5d9a8 100644 --- a/tutorials/hana-cloud-dl-clients-node/hana-cloud-dl-clients-node.md +++ b/tutorials/hana-cloud-dl-clients-node/hana-cloud-dl-clients-node.md @@ -29,9 +29,9 @@ Ensure you have Node.js installed and check its version. Enter the following com node -v ``` -If Node.js is installed, the currently installed version is returned, such as v20.10.0. +If Node.js is installed, the currently installed version is returned, such as v22.16.0. -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/). +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/). >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/). @@ -44,6 +44,11 @@ If Node.js is not installed, download the long-term support (LTS) version of Nod ### Install the data lake Relational Engine client for Node.js 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. +The SQL Anywhere driver can be installed by running this command. + + ```Shell (Microsoft Windows) +npm install sqlanywhere + ``` 1. Add the dependencies to the driver. @@ -57,7 +62,7 @@ The Node.js driver covered in this tutorial is `@sap\iq-client` which supports t npm install ``` -2. Create a folder named `node` and enter the newly created directory. +2. Open a new Shell and create a folder named `node` and enter the newly created directory. ```Shell (Microsoft Windows) mkdir %HOMEPATH%\DataLakeClientsTutorial\node @@ -112,7 +117,7 @@ The Node.js driver covered in this tutorial is `@sap\iq-client` which supports t const { PerformanceObserver, performance } = require('perf_hooks'); var t0; var util = require('util'); - var datalakeIQ = require('@sap/iq-client'); + var datalakeRE = require('@sap/iq-client'); var connOptions = { 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 }; //Synchronous example querying a table - var connection = datalakeIQ.createConnection(); + var connection = datalakeRE.createConnection(); connection.connect(connOptions); 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 Two examples showing the drivers methods being used asynchronously are shown in the next two steps. - >To enable debug logging of the SAP IQ Node.js client, enter the following command and then rerun the app. + >To enable debug logging of the Node.js client, enter the following command and then rerun the app. >```Shell (Microsoft Windows) >set DEBUG=* @@ -200,7 +205,7 @@ Asynchronous programming enables non-blocking code execution which is demonstrat const { PerformanceObserver, performance } = require('perf_hooks'); var t0; var util = require('util'); - var datalakeIQ = require('@sap/iq-client'); + var datalakeRE = require('@sap/iq-client'); var connOptions = { 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 }; //Asynchronous example calling a stored procedure with callbacks - var connection = datalakeIQ.createConnection(); + var connection = datalakeRE.createConnection(); connection.connect(connOptions, function(err) { if (err) { @@ -296,7 +301,7 @@ The Node.js driver for the data lake Relational Engine client provides support f const { PerformanceObserver, performance } = require('perf_hooks'); var t0; var util = require('util'); - var datalakeIQ = require('@sap/iq-client'); + var datalakeRE = require('@sap/iq-client'); var PromiseModule = require('@sap/iq-client/extension/Promise.js'); var connOptions = { @@ -308,7 +313,7 @@ The Node.js driver for the data lake Relational Engine client provides support f }; //Asynchronous example calling a stored procedure that uses the promise module - var connection = datalakeIQ.createConnection(); + var connection = datalakeRE.createConnection(); var statement; PromiseModule.connect(connection, connOptions) @@ -379,7 +384,7 @@ The Node.js driver for the data lake Relational Engine client provides support f ### Debug the application -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. +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. 1. If required, download [Visual Studio Code.](https://code.visualstudio.com/Download). @@ -397,6 +402,13 @@ Visual Studio Code can run and debug a Node.js application. It is a lightweight ![VS Code Debugging](debugging.png) + If "Can't find Node.js binary 'node': path does not exist" error pops up, open a Shell and run the following command. + ```Shell + code . + ``` + Then restart VSCode. + + ### Knowledge check Congratulations! You have created and debugged a Node.js application that connects to and queries an SAP data lake Relational Engine database. diff --git a/tutorials/hana-cloud-dl-clients-node/npm-list.png b/tutorials/hana-cloud-dl-clients-node/npm-list.png index 5620afaa59..24b5bc1696 100644 Binary files a/tutorials/hana-cloud-dl-clients-node/npm-list.png and b/tutorials/hana-cloud-dl-clients-node/npm-list.png differ diff --git a/tutorials/hana-cloud-dl-clients-odbc/Create-new-data-source-1.png b/tutorials/hana-cloud-dl-clients-odbc/Create-new-data-source-1.png index 7ed2d2fa34..5f83078705 100644 Binary files a/tutorials/hana-cloud-dl-clients-odbc/Create-new-data-source-1.png and b/tutorials/hana-cloud-dl-clients-odbc/Create-new-data-source-1.png differ diff --git a/tutorials/hana-cloud-dl-clients-odbc/ODBC-add.png b/tutorials/hana-cloud-dl-clients-odbc/ODBC-add.png index 030721792f..87290bdb73 100644 Binary files a/tutorials/hana-cloud-dl-clients-odbc/ODBC-add.png and b/tutorials/hana-cloud-dl-clients-odbc/ODBC-add.png differ diff --git a/tutorials/hana-cloud-dl-clients-odbc/drivers-1.png b/tutorials/hana-cloud-dl-clients-odbc/drivers-1.png index 0f70eb245a..4ae6d1452d 100644 Binary files a/tutorials/hana-cloud-dl-clients-odbc/drivers-1.png and b/tutorials/hana-cloud-dl-clients-odbc/drivers-1.png differ diff --git a/tutorials/hana-cloud-dl-clients-odbc/hana-cloud-dl-clients-odbc.md b/tutorials/hana-cloud-dl-clients-odbc/hana-cloud-dl-clients-odbc.md index 82049c205f..e6f9f592e2 100644 --- a/tutorials/hana-cloud-dl-clients-odbc/hana-cloud-dl-clients-odbc.md +++ b/tutorials/hana-cloud-dl-clients-odbc/hana-cloud-dl-clients-odbc.md @@ -39,7 +39,7 @@ The ODBC Data Source Administrator can be used to view the installed ODBC driver ![Add ODBC user data source](ODBC-add.png) -5. Select **SAP IQ** and click **Finish**. +5. Select **SAP HANA Cloud, data lake Relational Engine** and click **Finish**. ![New data source](Create-new-data-source-1.png) diff --git a/tutorials/hana-cloud-dl-clients-odbc/start-odbc.png b/tutorials/hana-cloud-dl-clients-odbc/start-odbc.png index a0d3185eca..81f171fb8f 100644 Binary files a/tutorials/hana-cloud-dl-clients-odbc/start-odbc.png and b/tutorials/hana-cloud-dl-clients-odbc/start-odbc.png differ diff --git a/tutorials/hana-cloud-dl-clients-overview/calling-hdlclienv.png b/tutorials/hana-cloud-dl-clients-overview/calling-hdlclienv.png new file mode 100644 index 0000000000..83eb5d1ff8 Binary files /dev/null and b/tutorials/hana-cloud-dl-clients-overview/calling-hdlclienv.png differ diff --git a/tutorials/hana-cloud-dl-clients-overview/crypto-check.png b/tutorials/hana-cloud-dl-clients-overview/crypto-check.png new file mode 100644 index 0000000000..d8eb841536 Binary files /dev/null and b/tutorials/hana-cloud-dl-clients-overview/crypto-check.png differ diff --git a/tutorials/hana-cloud-dl-clients-overview/database-objects.png b/tutorials/hana-cloud-dl-clients-overview/database-objects.png new file mode 100644 index 0000000000..58045e2ee9 Binary files /dev/null and b/tutorials/hana-cloud-dl-clients-overview/database-objects.png differ diff --git a/tutorials/hana-cloud-dl-clients-overview/development-tools-win.png b/tutorials/hana-cloud-dl-clients-overview/development-tools-win.png new file mode 100644 index 0000000000..b36c5b9a1b Binary files /dev/null and b/tutorials/hana-cloud-dl-clients-overview/development-tools-win.png differ diff --git a/tutorials/hana-cloud-dl-clients-overview/effect-of-call-bat-file.png b/tutorials/hana-cloud-dl-clients-overview/effect-of-call-bat-file.png new file mode 100644 index 0000000000..538b7a1fbb Binary files /dev/null and b/tutorials/hana-cloud-dl-clients-overview/effect-of-call-bat-file.png differ diff --git a/tutorials/hana-cloud-dl-clients-overview/env-variables.png b/tutorials/hana-cloud-dl-clients-overview/env-variables.png new file mode 100644 index 0000000000..3a2f2006e4 Binary files /dev/null and b/tutorials/hana-cloud-dl-clients-overview/env-variables.png differ diff --git a/tutorials/hana-cloud-dl-clients-overview/feedback.png b/tutorials/hana-cloud-dl-clients-overview/feedback.png index c21542b509..5b5341a6a4 100644 Binary files a/tutorials/hana-cloud-dl-clients-overview/feedback.png and b/tutorials/hana-cloud-dl-clients-overview/feedback.png differ diff --git a/tutorials/hana-cloud-dl-clients-overview/hana-cloud-dl-clients-overview.md b/tutorials/hana-cloud-dl-clients-overview/hana-cloud-dl-clients-overview.md index 151b2800d1..896de2d268 100644 --- a/tutorials/hana-cloud-dl-clients-overview/hana-cloud-dl-clients-overview.md +++ b/tutorials/hana-cloud-dl-clients-overview/hana-cloud-dl-clients-overview.md @@ -16,10 +16,11 @@ primary_tag: software-product-function>sap-hana-cloud--data-lake - Information about SAP HANA Cloud, data lake Relational Engine - How to install the data lake client - How to create sample tables, views, and procedures - - How to connect using SAP HANA Central, SAP HANA database explorer, and the Interactive SQL Client + - How to connect using the SQL Console and database objects apps in SAP HANA Cloud Central + - How to connect using the Interactive SQL Client (DBISQL) ## Intro -This tutorial group will provide guidance on setting up an instance of [SAP HANA Cloud, data lake](https://help.sap.com/docs/hana-cloud-data-lake) so that it can then be connected to and queried using a few of the data lake client interfaces as described in [SAP HANA Cloud, Data Lake Developer Guide for Data Lake Relational Engine](https://help.sap.com/docs/hana-cloud-data-lake/developer-guide-for-data-lake-relational-engine/sap-hana-cloud-data-lake-developer-guide-for-data-lake-relational-engine). +This tutorial group will provide guidance on setting up an instance of [SAP HANA Cloud, data lake](https://help.sap.com/docs/hana-cloud-data-lake) so that it can then be connected to and queried using a few of the data lake client interfaces as described in [SAP HANA Cloud, Data Lake Developer Guide for Data Lake Relational Engine](https://help.sap.com/docs/hana-cloud-data-lake/developer-guide-for-data-lake-relational-engine/sap-hana-cloud-data-lake-developer-guide-for-data-lake-relational-engine) and [SAP HANA Cloud, Data Lake Client Interfaces](https://help.sap.com/docs/hana-cloud-data-lake/client-interfaces/sap-hana-cloud-data-lake-client-connections). > Access help from the SAP community or provide feedback on this tutorial by navigating to the Feedback link shown below. > @@ -41,18 +42,18 @@ SAP HANA Cloud is composed of multiple components. >Note, that the data lake Files component, is currently not available in free tier or trial accounts. ### Choose where to deploy the database instances -The SAP BTP platform provides multiple runtime environments such as Cloud Foundry and Kyma. When a SAP HANA Cloud or data lake instance is created, it can be created in a BTP subaccount or in a Cloud Foundry space. SAP HANA Cloud Central can be used to provision and manage instances in the BTP subaccount or in a Cloud Foundry space. In the screenshot below, there is an instance of a data lake that was provisioned in the BTP subaccount (Other Environments) and one that was provisioned into Cloud Foundry. +The SAP Business Technology Platform (SAP BTP) provides multiple runtime environments such as Cloud Foundry and Kyma. When a data lake instance is created, it can be created in an SAP BTP subaccount or in a Cloud Foundry space. SAP HANA Cloud Central can be used to provision and manage instances in the SAP BTP subaccount or in a Cloud Foundry space. In the screenshot below, there is an instance of a data lake that was provisioned in the SAP BTP subaccount (Other Environments) and one that was provisioned into Cloud Foundry. ![Runtime Environments](runtime.png) -The multi-environment tooling (once a subscription and setup is complete) can be accessed under subscriptions. +SAP HANA Cloud Central can be accessed (once a subscription and setup is complete) under instances and subscriptions. ![multi environment tools](multi-env-tools.png) ### Create a data lake instance >To complete the tutorials in this group, a SAP HANA Cloud, data lake instance is needed. There are two different free options available, which are the SAP BTP free-tier and SAP BTP trial. For instructions on registering, see [Set Up Your SAP HANA Cloud, SAP HANA Database (free tier or trial) and Understand the Basics](group.hana-cloud-get-started-1-trial). -The following steps provide instructions on how to create a data lake instance in the SAP Business Technology Platform (BTP) trial. Additional content on this topic is available at [Quick Start Tutorial for Data Lake](https://help.sap.com/docs/hana-cloud-data-lake/quick-start-tutorial-for-standalone-data-lake/quick-start-tutorial-for-standalone-data-lake). +The following steps provide instructions on how to create a data lake instance in the SAP BTP trial. Additional content on this topic is available at [Quick Start Tutorial for Data Lake](https://help.sap.com/docs/hana-cloud-data-lake/quick-start-tutorial-for-standalone-data-lake/quick-start-tutorial-for-standalone-data-lake). There are multiple ways to create a data lake: @@ -70,25 +71,27 @@ There are multiple ways to create a data lake: ![independent data lake](standalone.png) - On the **Type** page select the option **SAP HANA Cloud, data lake**. + On the **Type** page, select the option **SAP HANA Cloud, data lake**. ![Standalone data lake](standalone2.png) A standalone data lake can be configured with additional options such a collation value of UTF8BIN and blank padding set to ON to be more compatible with an on-premise SAP IQ. +Perform the following steps to create a data lake Relational Engine. + 1. Open SAP HANA Cloud Central. 2. If a data lake is not already present, add one using one of the three methods previously described. - Take note when creating the data lake that the administration user is HDLADMIN. + Take note that when creating the data lake Relational Engine instance, the administration user is HDLADMIN. - >The HDLADMIN user has a [login policy](https://help.sap.com/docs/hana-cloud-data-lake/user-management-for-data-lake-relational-engine/login-policy-options) that enforces the [update of the password](https://help.sap.com/docs/hana-cloud-data-lake/user-management-for-data-lake-relational-engine/changing-password-single-control) after 180 days. + >The HDLADMIN user has a [login policy](https://help.sap.com/docs/hana-cloud-data-lake/security-for-data-lake-relational-engine/login-policy-options) that enforces the [update of the password](https://help.sap.com/docs/hana-cloud-data-lake/security-for-data-lake-relational-engine/changing-password-single-control) after 180 days. 3. If this instance is a free tier or trial instance or a test instance, set allowed connections to **Allow all IP addresses** so that client applications can connect from any IP address. ![Allowed connections](allowed-connections.png) -4. After a while, press the **Refresh** button or enable auto-refresh and the status should change from CREATING to RUNNING once the instance has been created. +4. Press the **Refresh** button or enable auto-refresh and wait for the status to change from CREATING to RUNNING. ![data lake running](data-lake-running.png) @@ -126,16 +129,11 @@ In this step, a sample HOTEL dataset will be created comprising tables, a view, CALL sa_conn_properties(CONNECTION_PROPERTY('Number')); ``` - ![SAP HANA database explorer](sql-console-query.png) + ![Query's in SQL Console](sql-console-query.png) Additional details can be found at [System Functions](https://help.sap.com/docs/hana-cloud-data-lake/sql-reference-for-data-lake-relational-engine/system-functions) and [Stored Procedures in Data Lake Relational Engine](https://help.sap.com/docs/hana-cloud-data-lake/sql-reference-for-data-lake-relational-engine/system-procedures-for-data-lake-relational-engine). - -3. From the actions menu, select **Open in SAP HANA Database Explorer**. - - ![open the SAP HANA database explorer](open-dbx.png) - - In the SAP HANA database explorer, execute the following SQL statements. +3. Execute the below SQL statements ```SQL ---- drops the schema and all objects it contains @@ -277,20 +275,20 @@ In this step, a sample HOTEL dataset will be created comprising tables, a view, ORDER BY CUS.NAME ASC; END; ``` + +4. Open the database objects app. Select the instance, select **Tables**, and set the schema filter to be **HOTELS** to limit the returned tables to be those that were just created in the HOTELS schema. - Select **Tables**, and set the schema filter to be **HOTELS** to limit the returned tables to be those that were just created in the HOTEL schema. - - ![DBX Create](sql-commands.png) + ![database objects app](database-objects.png) Additional details on the SQL used above can be found at [CREATE TABLE Statement for Data Lake Relational Engine](https://help.sap.com/docs/hana-cloud-data-lake/sql-reference-for-data-lake-relational-engine/create-table-statement-for-data-lake-relational-engine), [CREATE VIEW Statement for Data Lake Relational Engine](https://help.sap.com/docs/hana-cloud-data-lake/sql-reference-for-data-lake-relational-engine/create-view-statement-for-data-lake-relational-engine), and [CREATE PROCEDURE Statement for Data Lake Relational Engine](https://help.sap.com/docs/hana-cloud-data-lake/sql-reference-for-data-lake-relational-engine/create-procedure-statement-for-data-lake-relational-engine). - > Identifiers such as the column names in a table are [case-insensitive](https://help.sap.com/docs/hana-cloud-data-lake/sql-reference-for-data-lake-relational-engine/sap-hana-cloud-data-lake-sql-reference-for-data-lake-relational-engine). + >Identifiers such as the column names in a table are [case-insensitive](https://help.sap.com/docs/hana-cloud-data-lake/sql-reference-for-data-lake-relational-engine/case-sensitivity-of-identifiers). -For additional details on the SAP HANA database explorer, see the tutorial [Get Started with the SAP HANA Database Explorer](group.hana-cloud-get-started), which showcases many of its features. +For additional details on the SQL Console and database objects app, see the tutorials [Query Databases Using the SQL Console in SAP HANA Cloud Central](https://developers.sap.com/tutorials/hana-dbx-hcc.html) and [Browse and Explore Catalog Objects with the Database Objects App](https://developers.sap.com/tutorials/hana-dbx-database-objects.html), which showcases many of their features. -### Install the developer licensed version of the data lake client -This version of the data lake client does not include cryptographic libraries as it makes use of the libraries that are available on the operating systems such as OpenSSL. It is available for download after accepting the SAP Developer License agreement. Currently, this version is only available for Linux. Choose which client you would like to use and follow either step 6 or step 7. Either client can be used to complete the steps shown in this tutorial group. +### Install the developer licensed version of the data lake client for Linux +This version of the data lake client does not include cryptographic libraries as it makes use of the libraries that are available on the operating systems such as OpenSSL. The data lake client is available for download after accepting the SAP Developer License agreement. Currently, this version is available for Microsoft Windows and Linux. Choose which client you would like to use and follow either step 6, 7 or 8. Either client can be used to complete the steps shown in this tutorial group. 1. Open the HANA tab of [SAP Development Tools](https://tools.hana.ondemand.com/#hanatools). @@ -307,13 +305,12 @@ This version of the data lake client does not include cryptographic libraries as 4. Start the installer. ```Shell (Linux) - cd ebf* ./hdbinst ``` ![run the installer](hdbinst.png) -5. Configure the environment variables. This can be done by calling hdlclienv.sh manually or it can be added to the Bash shell by referencing it in `.bashrc`. +5. Configure the environment variables. This can be done by calling `hdlclienv.sh` manually or it can be added to the Bash shell by referencing it in `.bashrc`. Open the `.bashrc`. @@ -346,19 +343,63 @@ This version of the data lake client does not include cryptographic libraries as echo $IQDIR17 ``` - >In the case that the Data Lake Client needs to be uninstalled, run the `hdbuninst` file located in the directory `~/sap/hdlclient/install`. + >In the case that the data lake client needs to be uninstalled, run the `hdbuninst` file located in the directory `~/sap/hdlclient/install`. --- +### Install the developer licensed version of the data lake client for Microsoft Windows +This version of the data lake client does not include cryptographic libraries and requires openSSL to be installed separately to provide cryptography. The data lake client is available for download after accepting the SAP Developer License agreement. Currently, this version is available for Microsoft Windows and Linux. Choose which client you would like to use and follow either step 6, 7 or 8. Either client can be used to complete the steps shown in this tutorial group. + +Ensure that [SAP JVM 8.0](https://tools.hana.ondemand.com/#cloud) is installed before proceeding with the following steps. The DBISQL tool requires [SAP JVM 8.0](https://tools.hana.ondemand.com/#cloud) + +1. Open the HANA tab of [SAP Development Tools](https://tools.hana.ondemand.com/#hanatools). + +2. Download the SAP HANA Data Lake Client 1.0. + + ![download](development-tools-win.png) + +3. Run hdbsetup.exe. + + ![run the installer](windows-dev-lic-installer.png) + + + +4. Examine the installation log and take note if the required crypto libraries were located in the machines path. + + ![crypto check](crypto-check.png) + + If these libraries were not found but are on your machine perhaps as part of the [git client](https://git-scm.com/downloads/win), add that folder to your path (For example, C:\Git\mingw64\bin). See also [Install the SAP HANA Data Lake Client (Developer License) in GUI Mode on Microsoft Windows](https://help.sap.com/docs/hana-cloud-data-lake/client-interfaces/install-sap-hana-data-lake-client-in-gui-mode-on-microsoft-windows). + +5. After the installation process is completed, open Microsoft Windows, click the **Start** icon and search for **environment variables**. Create a new variable, set the variable name to **JAVA_HOME** and the variable value as the location where JVM has been unzipped such as C:\SAP\SAPJVM8\jre. Press the **OK** to ensure the changes made by the installer are now active. + + ![JAVA_HOME creation](java-home-creation.png) + -### Install the data lake client -This version of the data lake client is available from the SAP Software Download Center and requires an S-user ID and only shows software that you have purchased. Additional details can be found at [Software Downloads FAQ](https://support.sap.com/content/dam/support/en_us/library/ssp/my-support/help-for-sap-support-applications/online_help-software_downloads.html#faq). Either client can be used to complete the steps shown in this tutorial group. Choose which client you would like to use and follow either step 6 or step 7. +6. Ensure that the following System variables exist. + + ![Environment variables](env-variables.png) + + +7. It is also possible to run a batch file that will temporarily set the environment variables. This can be done by calling hdlclienv.bat from within a command prompt. + + ![screenshot showing calling hdlclienv.bat](calling-hdlclienv.png) + + Then once called, the variables set can be seen by calling SET. + + ![variables set](effect-of-call-bat-file.png) + +>In the case the data lake client needs to be uninstalled, run the `hdbuninst` file located in the directory `C:\SAP\hdlclient\install`. + + + +### Install the data lake client downloaded from SAP Software Center +This version of the data lake client is available from the SAP Software Center and requires an S-user ID and only shows software that you have purchased. Additional details can be found at [Software Downloads FAQ](https://support.sap.com/content/dam/support/en_us/library/ssp/my-support/help-for-sap-support-applications/online_help-software_downloads.html#faq). Either client can be used to complete the steps shown in this tutorial group. Choose which client you would like to use and follow either step 6 or step 7. 1. Open [SAP for me](https://me.sap.com/softwarecenter) and navigate to **Support Packages & Patches** | **By Alphabetical Index (A-Z)**. ![SAP for Me Download Software](sap-for-me.png) - 2. Navigate to **H | HANA CLOUD CLIENTS | HANA CLOUD CLIENTS 1.0 | HANA DATALAKE CLIENT 1.0**. Select the platform (Windows or Linux) and download the latest version of the archive. + 2. Navigate to **H | HANA CLOUD CLIENTS | HANA CLOUD CLIENTS 1.0 | HANA DATALAKE CLIENT 1.0**. Select the platform (Microsoft Windows or Linux) and download the latest version of the archive. ![data lake software downloads](dl-software-downloads.png) @@ -394,7 +435,10 @@ This version of the data lake client is available from the SAP Software Download ./setup.bin ``` -3. Specify an install folder such as C:\sap\DLClient (for Windows) or /home/dan/sap/dlclient (for Linux) and install all the features. Choosing a similarly structured path will ensure a smooth experience throughout the tutorial and help reduce issues with paths. + >If the installation fails on Linux due to an InvocationTargetException, try installing Java first before proceeding with the installation again. + + +3. Specify an install folder such as C:\sap\DLClient (for Microsoft Windows) or /home/dan/sap/dlclient (for Linux) and install all the features. Choosing a similarly structured path will ensure a smooth experience throughout the tutorial and help reduce issues with paths. ![GUI Installer](windows-gui-install.png) @@ -408,7 +452,7 @@ This version of the data lake client is available from the SAP Software Download * On Microsoft Windows, open a new command prompt window and run the following to see the installation location. - ```Shell (Windows) + ```Shell (Microsoft Windows) ECHO %IQDIR17% ``` @@ -447,15 +491,71 @@ This version of the data lake client is available from the SAP Software Download >In the case that the Data Lake Client needs to be uninstalled, run the `uninstall.exe` file located in the directory `/path-to-data-lake-install/sybuninstall/IQClientSuite/`. - --- - - >If the installation fails on Linux due to an InvocationTargetException, try installing Java first before proceeding with the installation again. - + ### Connect with the Interactive SQL Client (DBISQL) The data lake client install includes [dbisql Interactive SQL Utility](https://help.sap.com/docs/hana-cloud-data-lake/client-interfaces/dbisql-interactive-sql-utility), which can be used to connect and query a data lake Relational Engine. The following steps will provide instructions on how to connect to the data lake Relational Engine using DBISQL and then populate the previously created tables with sample data. -1. Start the GUI version of DBISQL by searching from the Microsoft Windows Start menu. It can also be accessed by entering `dbisql` in the command prompt. +1. DBISQL requires SAP JVM 8.0. Verify that you have this installed by entering java -version as shown below. + + ```Shell + java -version + ``` + + ![java version](java-version.png) + + If you do not have this version on Microsoft Windows, it can be downloaded and configured as shown below + + * Download [SAP JVM 8.0](https://tools.hana.ondemand.com/#cloud) and unzip it to c:\SAP\SAPJVM8 + + * In your environment variables, add the bin subdirectory of JAVA_HOME to the existing Path environment variable. + + ![Windows Java variables](windows-java-home.png) + + * Open a new command prompt and test the change. + + ```Shell (Microsoft Windows) + java -version + dbisql + ``` + The Data Lake Relational Engine should start, this may take a moment. + + If you do not have this version on Linux, it can be downloaded and installed as shown below. + + * Download and install [SAP JVM 8.0](https://tools.hana.ondemand.com/#cloud) + + ```Shell (Linux) + unzip sapjvm-8.1.102-linux-x64.zip + mv ./sapjvm_8 ~/ + ``` + + * Add the following to your bashrc. + + ```Shell (Linux) + export JAVA_HOME=~/sapjvm_8 + export PATH=$PATH:$JAVA_HOME/bin + ``` + + * Apply and test the changes. + ```Shell (Linux) + source ~/.bashrc + java -version + dbisql + ``` + + If a further error occurs such as libXext.so.6: cannot open shared object file, install the missing components. + + ```Shell (Linux) + sudo zypper install libXext6 + sudo zypper install libXrender1 + sudo zypper install libXtst6 + sudo zypper install libXi6 + ``` + + If an error occurs mentioning that saip17.jar file has moved or has been deleted, examine + C:\Users\Public\Documents\DBISQL 17.1.6\dbisql_64.rep and optionally comment out with # the plugins that are not loading. + +2. Start the GUI version of DBISQL by entering `dbisql` in the command prompt. If the error "This file could not be found: java" occurs, follow the instructions below. @@ -489,13 +589,13 @@ The data lake client install includes [dbisql Interactive SQL Utility](https://h sudo zypper install libXi6 ``` -2. Specify the connection type. +3. Specify the connection type. ![Connection type](dbisql-connection-type.png) >The Connect window may appear enlarged on the screen. This can be adjusted by lowering the Scale and layout value in the device display settings. -3. Provide the connection details. See below on how to obtain the instance ID and landscape values. +4. Provide the connection details. See below on how to obtain the instance ID and landscape values. ![instance ID and landscape](connect-to-dl-iq.png) @@ -503,13 +603,19 @@ The data lake client install includes [dbisql Interactive SQL Utility](https://h >![copy sql endpoint](dbisql-copy-endpoint.png) > - > A failure to connect could be caused by the allowed connections list, which is editable in SAP HANA Cloud Central. + > A failure to connect could be caused by the allowed connections list, which is editable in SAP HANA Cloud Central. + Paste the folling code in the console and click run. + > + >```SQL + >SELECT * FROM SYS.SYSINFO; + >``` + > ![DBISQL Connected](dbisql-connected.png) >DBISQL can also be started without a GUI. > - >```Shell (Windows) + >```Shell (Microsoft Windows) dbisql -c "uid=USER1;pwd=Password1;host=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.iq.hdl.xxxx-xxxx.hanacloud.ondemand.com:443;ENC=TLS(tls_type=rsa;direct=yes)" -nogui >``` > diff --git a/tutorials/hana-cloud-dl-clients-overview/java-home-creation.png b/tutorials/hana-cloud-dl-clients-overview/java-home-creation.png new file mode 100644 index 0000000000..25b2724a80 Binary files /dev/null and b/tutorials/hana-cloud-dl-clients-overview/java-home-creation.png differ diff --git a/tutorials/hana-cloud-dl-clients-overview/java-home.png b/tutorials/hana-cloud-dl-clients-overview/java-home.png new file mode 100644 index 0000000000..d9e4cd0a65 Binary files /dev/null and b/tutorials/hana-cloud-dl-clients-overview/java-home.png differ diff --git a/tutorials/hana-cloud-dl-clients-overview/java-version.png b/tutorials/hana-cloud-dl-clients-overview/java-version.png new file mode 100644 index 0000000000..81b0403bab Binary files /dev/null and b/tutorials/hana-cloud-dl-clients-overview/java-version.png differ diff --git a/tutorials/hana-cloud-dl-clients-overview/open-dbx.jpg b/tutorials/hana-cloud-dl-clients-overview/open-dbx.jpg deleted file mode 100644 index bb81e6194e..0000000000 Binary files a/tutorials/hana-cloud-dl-clients-overview/open-dbx.jpg and /dev/null differ diff --git a/tutorials/hana-cloud-dl-clients-overview/sql-commands.png b/tutorials/hana-cloud-dl-clients-overview/sql-commands.png deleted file mode 100644 index bf425ad340..0000000000 Binary files a/tutorials/hana-cloud-dl-clients-overview/sql-commands.png and /dev/null differ diff --git a/tutorials/hana-cloud-dl-clients-overview/windows-dev-lic-installer.png b/tutorials/hana-cloud-dl-clients-overview/windows-dev-lic-installer.png new file mode 100644 index 0000000000..119f004603 Binary files /dev/null and b/tutorials/hana-cloud-dl-clients-overview/windows-dev-lic-installer.png differ diff --git a/tutorials/hana-cloud-dl-clients-overview/windows-java-home.png b/tutorials/hana-cloud-dl-clients-overview/windows-java-home.png index 45d5e1daf1..bc6d18c32f 100644 Binary files a/tutorials/hana-cloud-dl-clients-overview/windows-java-home.png and b/tutorials/hana-cloud-dl-clients-overview/windows-java-home.png differ diff --git a/tutorials/hana-cloud-dl-clients-python/hana-cloud-dl-clients-python.md b/tutorials/hana-cloud-dl-clients-python/hana-cloud-dl-clients-python.md index e7c9f0f01e..c2d2e337c3 100644 --- a/tutorials/hana-cloud-dl-clients-python/hana-cloud-dl-clients-python.md +++ b/tutorials/hana-cloud-dl-clients-python/hana-cloud-dl-clients-python.md @@ -61,7 +61,7 @@ The first step is to check if Python and pip are installed. The standard package installer for Python is [pip](https://pypi.org/project/pip/). The following commands will check the version of pip and attempt to upgrade it to the latest available version. Again, use the pip or pip3 command that returns a version 3.4 or greater of Python. - >On Linux or Mac, if you encounter permission issues, one way to solve the issue is to use `sudo` before the command. + >On Linux, if you encounter permission issues, one way to solve the issue is to use `sudo` before the command. >--- @@ -77,12 +77,16 @@ The `sqlanydb` package is the python driver for the data lake Relational Engine 1. Navigate to your Data Lake Client installation folder and enter the following command to install `sqlanydb`. + ```Shell (Microsoft Windows) + cd %IQDIR17%\SDK\Python + pip install sqlanydb-1.0.14.tar.gz + ``` + ```Shell (Microsoft Windows) cd %IQDIR17%\SDK\Python python setup.py install ``` - This should create additional build directories in the current folder. >If the error 'no module named setuptools' appears, the following may be used as a workaround until this issue is resolved. @@ -129,7 +133,7 @@ The `sqlanydb` package is the python driver for the data lake Relational Engine pip install sqlanydb-1.0.14.tar.gz ``` -2. On Microsoft Windows, create a user environment variable named `SQLANY_API_DLL` and set it to `%IQDIR17%\Bin64\dbcapi.dll`. +2. On Microsoft Windows for the non developer licensed install, create a user environment variable named `SQLANY_API_DLL` and set it to `%IQDIR17%\Bin64\dbcapi.dll`. ![add a variable named SQLANY_API_DLL](add-variable.png) @@ -176,7 +180,7 @@ The `sqlanydb` package is the python driver for the data lake Relational Engine conn.close() ``` -3. Run the app. Make sure your data lake Relational Engine is running before executing the app. +3. Save and close `pythonQuery.py`. Run the app. Make sure your data lake Relational Engine is running before executing the app. ```Shell python pythonQuery.py @@ -190,7 +194,7 @@ For further information on the Python Driver, visit [Python and Database Access] ### Install the Python ODBC bridge using pip and PyPI This is an alternate method of connecting to a data lake Relation Engine from a Python app. The Python ODBC bridge is an open source Python module available on [`PyPI`](https://pypi.org/project/pyodbc/). The performance characteristics between the two drivers may vary depending on the use case. -1. Ensure that you have created a connection to the data lake Relational Engine using ODBC as shown in step 1 or 2 of the [Connect to Data Lake Relational Engine Using the ODBC Driver](hana-cloud-dl-clients-odbc) tutorial. +1. Ensure that you have created a connection to the data lake Relational Engine using ODBC as shown in step 1 (Windows) or 2 (Linux) of the [Connect to Data Lake Relational Engine Using the ODBC Driver](hana-cloud-dl-clients-odbc) tutorial. 2. The repository that contains Python packages is [PyPI](https://pypi.org/) and includes a package for the `pyodbc` driver. @@ -251,7 +255,7 @@ This is an alternate method of connecting to a data lake Relation Engine from a curs.close() conn.close() ``` - + Save and close `pythongQuery.py`. 3. The `dsn` value refers to the data source name in the Microsoft Windows ODBC Administrator or the Linux `.odbc.ini` file. ![ODBC Administrator](odbcWindow.png)