diff --git a/tutorials/hana-clients-cf/hana-clients-cf.md b/tutorials/hana-clients-cf/hana-clients-cf.md index 422c25501..8152f77d6 100644 --- a/tutorials/hana-clients-cf/hana-clients-cf.md +++ b/tutorials/hana-clients-cf/hana-clients-cf.md @@ -78,7 +78,7 @@ The command line interface (CLI) for Cloud Foundry is named `cf` while the CLI u The API URL, if requested, can be found in the Overview page in [SAP BTP cockpit](https://account.hanatrial.ondemand.com/trial/). - ![api URL](api.png) + ![API URL](api.png) The API URL can be set with the below command. @@ -212,7 +212,7 @@ The command line interface (CLI) for Cloud Foundry is named `cf` while the CLI u Open a browser and enter a URL similar to http://localhost:3000/Customers. - ![running locally](local.png) + ![Running locally](local.png) ### Deploy and test in SAP BTP or XS Advanced @@ -251,7 +251,7 @@ The command line interface (CLI) for Cloud Foundry is named `cf` while the CLI u If necessary, you can add the entitlement by clicking Edit. Don't forget to save your changes when finished. - ![Add CF Memory service plan](add-cf-runtime-entitlement.png) + ![Add CF memory service plan](add-cf-runtime-entitlement.png) After verifying that you have the necessary entitlements, run the following: @@ -259,7 +259,7 @@ The command line interface (CLI) for Cloud Foundry is named `cf` while the CLI u cf push ``` - ![push result](cfPush.png) + ![Push result](cfPush.png) Notice above the URL to open the app was generated as the `manifest.yml` contained the random-route setting. @@ -267,7 +267,7 @@ The command line interface (CLI) for Cloud Foundry is named `cf` while the CLI u xs push ``` - ![push result](xsPush.png) + ![Push result](xsPush.png) Alternatively, the URL of the app can be found by running the following command: @@ -324,7 +324,7 @@ For additional details see: cf events nodeQueryCF ``` - ![events](events.png) + ![Events](events.png) 4. The logs of the application can be seen with the below command: @@ -352,7 +352,7 @@ For additional details see: Refresh the browser and notice that the trace information can now be seen. - ![trace](trace.png) + ![Trace](trace.png) 6. The deployed app can also be managed in the associated cockpit. @@ -380,19 +380,19 @@ The [Cloud Connector](https://help.sap.com/docs/connectivity/sap-btp-connectivit - Navigate to **Service Bindings** and choose **Bind Service**. - ![bind service](bind-service1.png) + ![Bind service](bind-service1.png) - Add the **Connectivity** service. - ![connectivity service](connectivity-service.png) + ![Connectivity service](connectivity-service.png) - Provide an instance name such as `MyConnectivityService`. - ![connectivity service](connectivity-service2.png) + ![Connectivity service](connectivity-service2.png) - Examine the values of the connectivity service. The indicated values below are used for the `proxyPort` and `proxyHostname` values in the `server.js` file. It will be to access the proxy service which enables communication with the cloud connector. - ![connectivity service](connectivity-service3.png) + ![Connectivity service](connectivity-service3.png) 3. Add the service name to the project's manifest.yml. @@ -526,4 +526,4 @@ The [Cloud Connector](https://help.sap.com/docs/connectivity/sap-btp-connectivit Congratulations, you have built, deployed, and run an app that queries SAP HANA in Cloud Foundry and XS advanced as well as become familiar with the command line interface. ---- \ No newline at end of file +--- diff --git a/tutorials/hana-clients-trace/BTP-app-variables.png b/tutorials/hana-clients-trace/BTP-app-variables.png new file mode 100644 index 000000000..e8e439030 Binary files /dev/null and b/tutorials/hana-clients-trace/BTP-app-variables.png differ diff --git a/tutorials/hana-clients-trace/environment-variables-z.png b/tutorials/hana-clients-trace/environment-variables-z.png new file mode 100644 index 000000000..b5a443064 Binary files /dev/null and b/tutorials/hana-clients-trace/environment-variables-z.png differ diff --git a/tutorials/hana-clients-trace/hana-clients-trace.md b/tutorials/hana-clients-trace/hana-clients-trace.md index 13032261d..feaa1d45d 100644 --- a/tutorials/hana-clients-trace/hana-clients-trace.md +++ b/tutorials/hana-clients-trace/hana-clients-trace.md @@ -25,7 +25,7 @@ primary_tag: software-product>sap-hana-cloud Trace files can help SAP Support diagnose unexpected behavior. -Tracing can be configured using executables included with the SAP HANA Client installation. [SQLDBC](https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/0c20691739094593855ece908b4a3cde.html)-based interfaces use `hdbsqldbc_cons`, except for [ODBC](https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/35368f78f6884b019caee12c125b255a.html), which uses `hdbodbc_cons`. For [JDBC](https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/4033f8e603504c0faf305ab77627af03.html), use `ngdbc.jar`. +Tracing can be configured using executables included with the SAP HANA Client installation. [SQLDBC](https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/0c20691739094593855ece908b4a3cde.html)-based interfaces use `hdbsqldbc_cons`, except for [ODBC](https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/35368f78f6884b019caee12c125b255a.html), which uses `hdbodbc_cons`. For [JDBC](https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/4033f8e603504c0faf305ab77627af03.html), use `ngdbc.jar`. Trace settings can also be configured using environment variables, or via connection parameters. @@ -43,7 +43,6 @@ Trace settings can also be configured using environment variables, or via connec > `hdbsqldbc_cons` utility can be found in the `sap/hdbclient` folder. - 2. To enable tracing of SQL statements at the INFO level, to enable tracing of TIMING info, and to specify the trace file location and name, enter the following commands: ```Shell (Microsoft Windows) @@ -86,7 +85,7 @@ Trace settings can also be configured using environment variables, or via connec hdbsqldbc_cons SHOW ALL ``` - ![trace settings](trace-settings.png) + ![Trace settings](trace-settings.png) 3. Run the following command to connect to HDBSQL and query for the status. Since tracing is enabled, a trace file will be generated and can be used to see which SQL statements are called by `\s`. @@ -108,7 +107,7 @@ Trace settings can also be configured using environment variables, or via connec pico SQLDBC-####.txt ``` - ![Replace Process ID](ReplaceProcessID.png) + ![Replace process ID](ReplaceProcessID.png) Notice that the trace settings are shown at the top of the file. @@ -232,9 +231,9 @@ The following are some additional options for tracing. 4. In situations where `hdbsqldbc_cons` is not accessible, perhaps because a driver was installed directly using npm or pip, trace settings can be set using environment variables. The following values can be used in the trace file name. - * %p represents the process ID - * %a represents the application user - * %c represents the connection ID + - %p represents the process ID + - %a represents the application user + - %c represents the connection ID ```Shell (Windows) set HDB_SQLDBC_TRACEFILE=c:\temp\traces\SQLDBC-%p.txt @@ -267,22 +266,39 @@ The following are some additional options for tracing. printenv | grep HDB_SQLDBC_TRACE ``` - ![Environment Variable Values](EnvironmentVariable.png) + ![Environment variable values](EnvironmentVariable.png) 5. Trace information can be directed to `stdout` or `stderr`. See below for a few examples. ```Shell - hdbsql -U User1UserKey -Z traceFile=stdout -Z traceOptions=sql=warning "SELECT * FROM HOTELS.CUSTOMER" + hdbsql -U User1UserKey -Z traceFile=stdout -Z traceOptions=SQL=ERROR,DEBUG=FATAL,FLUSH=ON "SELECT * FROM HOTELS.CUSTOMER" ``` ```Shell - set HDB_SQLDBC_TRACEOPTS=SQL=WARN + set HDB_SQLDBC_TRACEOPTS=SQL=ERROR,DEBUG=FATAL,FLUSH=ON set HDB_SQLDBC_TRACEFILE=stdout hdbsql -U User1UserKey "SELECT * FROM HOTELS.CUSTOMER" set HDB_SQLDBC_TRACEOPTS= set HDB_SQLDBC_TRACEFILE= ``` + ![Environment variables set using -Z](environment-variables-z.png) + + It is also possible to set in a Cloud Foundry manifest file or in the SAP BTP Cockpit. + + ```manifest.yaml + applications: + - name: test-hana-node-tracing + memory: 1G + instances: 1 + path: ../ + env: + HDB_SQLDBC_TRACEFILE: stdout + HDB_SQLDBC_TRACEOPTS: SQL=ERROR,DEBUG=FATAL,FLUSH=ON + ``` + + ![Application variables](BTP-app-variables.png) + 6. Tracing can also be enabled in an application's connection properties. For further details see `traceFile` and `traceOptions` in [SQLDBC Connection Properties](https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/f6fb06ffe4484f6fa61f10082b11663d.html). ### Tracing a JDBC Connection @@ -314,7 +330,7 @@ javac -version java -jar ~/sap/hdbclient/ngdbc.jar ``` - ![JDBC Driver GUI](JDBC-Driver-Trace-Config.png) + ![JDBC driver GUI](JDBC-Driver-Trace-Config.png) 2. Turn on the tracing for SQL statements using either the GUI or the commands below: diff --git a/tutorials/hana-cloud-sqltools-console/hana-cloud-sqltools-console.md b/tutorials/hana-cloud-sqltools-console/hana-cloud-sqltools-console.md index 721cbd2a6..35f92f9ff 100644 --- a/tutorials/hana-cloud-sqltools-console/hana-cloud-sqltools-console.md +++ b/tutorials/hana-cloud-sqltools-console/hana-cloud-sqltools-console.md @@ -1,7 +1,7 @@ --- parser: v2 auto_validation: true -time: 10 +time: 15 author_name: Dan van Leeuwen author_profile: https://github.com/danielva tags: [tutorial>beginner, software-product>sap-hana-cloud, software-product-function>sap-hana-cloud--sap-hana-database, software-product-function>sap-hana-cloud--data-lake] diff --git a/tutorials/hana-cloud-sqltools-create-schema/explain.png b/tutorials/hana-cloud-sqltools-create-schema/explain.png new file mode 100644 index 000000000..9f90b1122 Binary files /dev/null and b/tutorials/hana-cloud-sqltools-create-schema/explain.png differ diff --git a/tutorials/hana-cloud-sqltools-create-schema/hana-cloud-sqltools-create-schema.md b/tutorials/hana-cloud-sqltools-create-schema/hana-cloud-sqltools-create-schema.md index ebf9a90cc..612916b76 100644 --- a/tutorials/hana-cloud-sqltools-create-schema/hana-cloud-sqltools-create-schema.md +++ b/tutorials/hana-cloud-sqltools-create-schema/hana-cloud-sqltools-create-schema.md @@ -3,7 +3,7 @@ parser: v2 auto_validation: true author_name: Dan van Leeuwen author_profile: https://github.com/danielva -time: 15 +time: 25 tags: [ tutorial>beginner, software-product>sap-hana-cloud, software-product-function>sap-hana-cloud--sap-hana-database, programming-tool>sql] primary_tag: software-product>sap-hana-cloud --- @@ -84,6 +84,12 @@ The following steps create a sample hotel dataset using CREATE and INSERT statem > ![User & role management in SAP HANA Cloud Central](user-management.png) + It is also possible to use the explain option in regions that support the feature for an explanation of SQL statements. + + ![Explain SQL](explain.png) + + This is covered further in the tutorial [Query Databases Using the SQL Console in SAP HANA Cloud Central](hana-cloud-sqltools-console). + 3. Open a new SQL console tab by pressing the **+** in the tab bar. This time we wish to connect with USER1 and to set the schema to HOTELS so we will not use the cached credentials (DBADMIN). Click on **Select an Instance** and choose the SAP HANA database. @@ -325,6 +331,18 @@ Execute the below SQL and notice that USER2 does not have the privilege to perfo For further details, consult [Identifiers and Case Sensitivity](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/introduction-to-sql#loio209f5020751910148fd8fe88aa4d79d9__identifiers_case). +4. Monitoring views contain information about the objects within a database. For further details see [Monitoring Views](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/monitoring-views?locale=en-US). + +```SQL +--List of tables and record counts in the schema HOTELS +SELECT SCHEMA_NAME, TABLE_NAME, RECORD_COUNT, TABLE_SIZE +FROM M_TABLES WHERE SCHEMA_NAME = 'HOTELS' ORDER BY RECORD_COUNT DESC; + +--List of columns and data types for the tables in schema HOTELS +SELECT SCHEMA_NAME, TABLE_NAME, COLUMN_NAME, DATA_TYPE_NAME +FROM TABLE_COLUMNS WHERE SCHEMA_NAME = 'HOTELS' ORDER BY TABLE_NAME ASC, COLUMN_NAME ASC; +``` + ### Explore auto-commit (optional) Auto-commit is a setting that when enabled, causes each SQL statement to be immediately committed to the database. When auto-commit is off, multiple statements can be executed and then committed or rolled back together. @@ -616,20 +634,6 @@ Another option for less frequently accessed data is the SAP HANA data lake. Add For additional details see [Procedures](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-sqlscript-reference/procedures). -### Examine the created objects using monitoring views - -Monitoring views contain information about the objects within a database. For further details see [Monitoring Views](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/monitoring-views?locale=en-US). - -```SQL ---List of tables and record counts in the schema HOTELS -SELECT SCHEMA_NAME, TABLE_NAME, RECORD_COUNT, TABLE_SIZE -FROM M_TABLES WHERE SCHEMA_NAME = 'HOTELS' ORDER BY RECORD_COUNT DESC; - ---List of columns and data types for the tables in schema HOTELS -SELECT SCHEMA_NAME, TABLE_NAME, COLUMN_NAME, DATA_TYPE_NAME -FROM TABLE_COLUMNS WHERE SCHEMA_NAME = 'HOTELS' ORDER BY TABLE_NAME ASC, COLUMN_NAME ASC; -``` - ### Schedule a stored procedure Procedures can be scheduled to run automatically in SAP HANA Cloud. diff --git a/tutorials/hana-cloud-sqltools-dbx-extension/hana-cloud-sqltools-dbx-extension.md b/tutorials/hana-cloud-sqltools-dbx-extension/hana-cloud-sqltools-dbx-extension.md index e3b04f67b..86e366738 100644 --- a/tutorials/hana-cloud-sqltools-dbx-extension/hana-cloud-sqltools-dbx-extension.md +++ b/tutorials/hana-cloud-sqltools-dbx-extension/hana-cloud-sqltools-dbx-extension.md @@ -57,7 +57,7 @@ Local connections are added directly in Visual Studio Code by specifying the hos 1. In the **Database List** section, navigate to **Local Connections** and click the **+** button to **Add SAP HANA Database**. -2. Select **SAP HANA Cloud** as the database type and enter values for **Host**, **Port**, **User**, and **Password**. You may also set a display name. This tutorial makes use of the `HOTELS` schema, in **Advanced Options** set `currentSchema=HOTELS;` +2. Select **SAP HANA Cloud** as the database type and enter values for **Host**, **Port**, **User**, and **Password**. These values can be obtained from the actions menu **Copy SQL Endpoint** of an instance in SAP HANA Cloud Central. Remember to remove the :443 and for the host value and to add 443 as the port. You may also set a display name. This tutorial makes use of the `HOTELS` schema, in **Advanced Options** set `currentSchema=HOTELS;` > Enable the **Connect to database securely using TLS/SSL** checkbox to ensure the connection is secure. If you do not check **Save Password**, you will be prompted for your password each time the extension starts. @@ -163,5 +163,3 @@ The SAP HANA Database Explorer extension includes a built-in collection of SQL s ### Knowledge check Congratulations! You have now used the SAP HANA Database Explorer extension for Visual Studio Code and have become familiar with some of the features it provides. - -[VALIDATE_7] \ No newline at end of file diff --git a/tutorials/hana-cloud-sqltools-import-export/hana-cloud-sqltools-import-export.md b/tutorials/hana-cloud-sqltools-import-export/hana-cloud-sqltools-import-export.md index bd9feb7b0..b618019c1 100644 --- a/tutorials/hana-cloud-sqltools-import-export/hana-cloud-sqltools-import-export.md +++ b/tutorials/hana-cloud-sqltools-import-export/hana-cloud-sqltools-import-export.md @@ -2,7 +2,7 @@ author_name: Michelle Wang author_profile: https://github.com/MichelleWangSAP auto_validation: true -time: 15 +time: 20 tags: [ tutorial>beginner, software-product>sap-hana-cloud, software-product-function>sap-hana-cloud--sap-hana-database, software-product-function>sap-hana-cloud--data-lake] primary_tag: software-product>sap-hana-cloud parser: v2 diff --git a/tutorials/hana-cloud-sqltools-multi-model/hana-cloud-sqltools-multi-model.md b/tutorials/hana-cloud-sqltools-multi-model/hana-cloud-sqltools-multi-model.md index 3b4759c4a..6712186b9 100644 --- a/tutorials/hana-cloud-sqltools-multi-model/hana-cloud-sqltools-multi-model.md +++ b/tutorials/hana-cloud-sqltools-multi-model/hana-cloud-sqltools-multi-model.md @@ -3,14 +3,14 @@ parser: v2 auto_validation: true author_name: Dan van Leeuwen author_profile: https://github.com/danielva -time: 15 +time: 20 tags: [ tutorial>beginner, software-product>sap-hana-cloud, software-product-function>sap-hana-cloud--sap-hana-database, software-product-function>sap-hana-multi-model-processing, software-product-function>sap-hana-spatial, software-product-function>sap-hana-graph, tutorial>license] primary_tag: software-product>sap-hana-cloud --- # Try Out Multi-Model Functionality with SAP HANA Cloud Central and Database Objects App - Explore knowledge graph, property graph, JSON document store, and spatial capabilities in SAP HANA Cloud Central. + Explore vector, knowledge graph, property graph, JSON document store, and spatial capabilities in SAP HANA Cloud Central. ## Prerequisites @@ -23,6 +23,8 @@ primary_tag: software-product>sap-hana-cloud ## Overview +The [SAP HANA Cloud vector engine](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-vector-engine-guide/introduction) enables similarity search using vector embeddings and built in functions. + A [knowledge graph](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-knowledge-graph-guide/sap-hana-cloud-sap-hana-database-knowledge-graph-engine-guide) can be used to store facts in triples providing additional meaning and relationships. A [property graph](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-property-graph-engine-reference/sap-hana-cloud-sap-hana-database-property-graph-engine-reference) can be used to show the connections between items such as the connections between airports or between people or groups in a social network. @@ -33,6 +35,51 @@ This tutorial is meant to be an introduction to these topics. For additional co --- +### Similarity searches using the vector engine + +The ability to embed text as a vector and to then use that in a similarity search will be demonstrated in the instructions that follow. A pre-requisite for these steps is to have enabled the Natural Language Processing (NLP) on the advanced settings tab of the instance provisioning or manage configuration wizard. + +1. Open the SQL console and examine the DESCRIPTION column in hte table MAINTENANCE. + + ```SQL + SET SCHEMA HOTELS; + SELECT * FROM MAINTENANCE; + `` + + ![Maintenance work in the hotels dataset](maintenance-table.png) + +2. Run the SQL below to see an example of the built-in VECTOR_EMBEDDING function that takes a string and converts it to a vector representation. + + ```SQL + SELECT VECTOR_EMBEDDING('Roof repair due to storm', 'DOCUMENT', 'SAP_NEB.20240715') FROM DUMMY; + ``` + +3. Create a new column in the MAINTENANCE table and populate it with a vector representation of the DESCRIPTION column. + + ```SQL + ALTER TABLE MAINTENANCE ADD (V_DESCRIPTION REAL_VECTOR GENERATED ALWAYS AS VECTOR_EMBEDDING(DESCRIPTION, 'DOCUMENT', 'SAP_NEB.20240715')); + + SELECT * FROM MAINTENANCE; + ``` + + ![Added a vector column](new-vector-column.png) + +4. Use the new V_DESCRIPTION column in a similarity search (COSINE_SIMILARITY). + + ```SQL + SELECT TOP 1 COSINE_SIMILARITY(V_DESCRIPTION, TO_REAL_VECTOR(VECTOR_EMBEDDING('shingles', 'DOCUMENT', 'SAP_NEB.20240715'))) AS SCORE, * + FROM MAINTENANCE ORDER BY SCORE DESC; + SELECT TOP 1 COSINE_SIMILARITY(V_DESCRIPTION, TO_REAL_VECTOR(VECTOR_EMBEDDING('swim', 'DOCUMENT', 'SAP_NEB.20240715'))) AS SCORE, * + FROM MAINTENANCE ORDER BY SCORE DESC; + + --Optionally remove the added EMBEDDING column + ALTER TABLE MAINTENANCE DROP (V_DESCRIPTION); + ``` + + ![Similarity search](similarity-search.png) + +For further details, see [SAP HANA Cloud, SAP HANA Database AI Development Guide](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-sap-hana-database-ai-development-guide/overview), [Creating Text Embeddings with NLP](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-vector-engine-guide/creating-text-embeddings-with-nlp-51eb170d038d4099a9bbb85c08fda888), and [Similarity Measures](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-vector-engine-guide/similarity-measures). + ### Enable the triple store and create a knowledge graph (optional) The following steps will create a knowledge graph that provides information on additional hotel amenities, explores the created knowledge graph using the database objects app, and then will perform a query on the knowledge graph. Knowledge graphs are also known as resource description framework (RDF) named graphs and are stored in a triple store. diff --git a/tutorials/hana-cloud-sqltools-multi-model/maintenance-table.png b/tutorials/hana-cloud-sqltools-multi-model/maintenance-table.png new file mode 100644 index 000000000..92626dfbb Binary files /dev/null and b/tutorials/hana-cloud-sqltools-multi-model/maintenance-table.png differ diff --git a/tutorials/hana-cloud-sqltools-multi-model/new-vector-column.png b/tutorials/hana-cloud-sqltools-multi-model/new-vector-column.png new file mode 100644 index 000000000..632eafb19 Binary files /dev/null and b/tutorials/hana-cloud-sqltools-multi-model/new-vector-column.png differ diff --git a/tutorials/hana-cloud-sqltools-multi-model/similarity-search.png b/tutorials/hana-cloud-sqltools-multi-model/similarity-search.png new file mode 100644 index 000000000..4a73c4dec Binary files /dev/null and b/tutorials/hana-cloud-sqltools-multi-model/similarity-search.png differ diff --git a/tutorials/hana-cloud-sqltools-remote-sources/cloud-to-cloud.png b/tutorials/hana-cloud-sqltools-remote-sources/cloud-to-cloud.png new file mode 100644 index 000000000..dac721bc7 Binary files /dev/null and b/tutorials/hana-cloud-sqltools-remote-sources/cloud-to-cloud.png differ diff --git a/tutorials/hana-cloud-sqltools-remote-sources/cloud-to-data-lake.png b/tutorials/hana-cloud-sqltools-remote-sources/cloud-to-data-lake.png new file mode 100644 index 000000000..7be0e089a Binary files /dev/null and b/tutorials/hana-cloud-sqltools-remote-sources/cloud-to-data-lake.png differ diff --git a/tutorials/hana-cloud-sqltools-remote-sources/data-lake-to-cloud.png b/tutorials/hana-cloud-sqltools-remote-sources/data-lake-to-cloud.png new file mode 100644 index 000000000..c4cf988c7 Binary files /dev/null and b/tutorials/hana-cloud-sqltools-remote-sources/data-lake-to-cloud.png differ diff --git a/tutorials/hana-cloud-sqltools-remote-sources/data-lake-to-data-lake.png b/tutorials/hana-cloud-sqltools-remote-sources/data-lake-to-data-lake.png new file mode 100644 index 000000000..a3fb2d75f Binary files /dev/null and b/tutorials/hana-cloud-sqltools-remote-sources/data-lake-to-data-lake.png differ diff --git a/tutorials/hana-cloud-sqltools-remote-sources/hana-cloud-sqltools-remote-sources.md b/tutorials/hana-cloud-sqltools-remote-sources/hana-cloud-sqltools-remote-sources.md index 15af1628d..b8be067a9 100644 --- a/tutorials/hana-cloud-sqltools-remote-sources/hana-cloud-sqltools-remote-sources.md +++ b/tutorials/hana-cloud-sqltools-remote-sources/hana-cloud-sqltools-remote-sources.md @@ -40,9 +40,9 @@ The example in step 1 demonstrates a connection from one SAP HANA Cloud, SAP HAN ### Connect from one SAP HANA Cloud, SAP HANA database to another -Two SAP HANA Cloud, SAP HANA database instances can be connected so that one can query data from the other in real time using virtual tables, without copying or moving data. +Two SAP HANA database instances can be connected so that you can query data stored in one database in real time from another using virtual tables, without copying or moving data. The diagram below shows the `tourist_reviews` table stored in one SAP HANA database and the `vt_tourist_reviews` virtual table created in a second SAP HANA database to provide access to the remote data. -![SAP HANA database connecting virtually to another SAP HANA database](virtual-table-diagram.png) +![SAP HANA database connecting virtually to another SAP HANA database](cloud-to-cloud.png) 1. In SAP HANA Cloud Central, select an SAP HANA database (HDB) instance (the one you want to connect *to*), and execute the following SQL statements to create the `tourist_reviews` table. @@ -159,7 +159,9 @@ Two SAP HANA Cloud, SAP HANA database instances can be connected so that one can ### Connect from SAP HANA Cloud, SAP HANA database to a data lake Relational Engine -[SAP HANA Cloud, data lake](https://help.sap.com/docs/hana-cloud-data-lake) can be used to store large amounts of data that is not accessed and updated as frequently as data in an SAP HANA database. The following steps create the table `tourist_reviews` in SAP HANA Cloud, data lake Relational Engine and access the table from the associated SAP HANA database (HDB) instance. +[SAP HANA Cloud, data lake](https://help.sap.com/docs/hana-cloud-data-lake) can be used to store large volumes of data that are accessed less frequently than data stored in SAP HANA database. The diagram below shows the `tourist_reviews` table stored in SAP HANA data lake and the `vt_dl_tourist_reviews` virtual table created in SAP HANA database so that you can access the remote data lake table without replicating the data. + + ![SAP HANA database connecting to a data lake Relational Engine](cloud-to-data-lake.png) 1. If needed, in SAP HANA Cloud Central, add an SAP HANA Cloud, data lake (HDLRE) instance to your SAP HANA Cloud instance, by choosing **Actions > Add Data Lake**. @@ -221,10 +223,6 @@ Two SAP HANA Cloud, SAP HANA database instances can be connected so that one can 6. In the HDB SQL console, create a virtual table named **`VT_DL_TOURIST_REVIEWS`** in the schema **HOTELS** that maps to the newly created table in the HDLRE. - This can be visualized as follows: - - ![SAP HANA database connecting to a data lake Relational Engine](dl-cloud-connection.png) - ```SQL CREATE VIRTUAL TABLE VT_DL_TOURIST_REVIEWS AT HC_DL.iqaas.HOTELS.TOURIST_REVIEWS; ``` @@ -265,7 +263,9 @@ Two SAP HANA Cloud, SAP HANA database instances can be connected so that one can ### Connect from a data lake Relational Engine to SAP HANA Cloud, SAP HANA database -The first task in preparing the data lake Relational Engine instance is creating a remote server that connects to the SAP HANA database instance that contains the data you want to access. +SAP HANA data lake can also access data stored in SAP HANA database without replicating the underlying data. The diagram below shows the `tourist_reviews` table stored in SAP HANA database and the `vt_hdb_tourist_reviews` virtual table created in SAP HANA data lake to provide access to the remote table. + + ![SAP HANA data lake connecting to an SAP HANA database](data-lake-to-cloud.png) 1. In SAP HANA Cloud Central, locate the SAP HANA database instance tile and choose **Actions > Copy SQL Endpoint** to obtain the host name. @@ -319,6 +319,10 @@ The first task in preparing the data lake Relational Engine instance is creating ### Connect from a data lake Relational Engine to another data lake Relational Engine +SAP HANA data lake instances can be connected so that you can access data stored in another data lake instance without copying or moving the underlying data. The diagram below shows the `tourist_reviews` table stored in one SAP HANA data lake instance and the `vt_hdlre_tourist_reviews` virtual table created in a second data lake instance to provide access to the remote table. + + ![SAP HANA data lake connecting virtually to another SAP HANA data lake](data-lake-to-data-lake.png) + 1. In SAP HANA Cloud Central, locate the target data lake instance tile and choose **Actions > Copy SQL Endpoint** to obtain the host name. 2. In SAP HANA Cloud Central, select the source data lake instance tile and choose **Actions > Open SQL Console**. diff --git a/tutorials/hana-cloud-sqltools-remote-sources/new-review.png b/tutorials/hana-cloud-sqltools-remote-sources/new-review.png deleted file mode 100644 index 88a7bb2ca..000000000 Binary files a/tutorials/hana-cloud-sqltools-remote-sources/new-review.png and /dev/null differ