SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
β€’ Open full site

Connect Using the SAP HANA Go Interface

Create and debug a Go application that connects to SAP HANA using the SAP HANA client.

Overview

🎓 beginner 15 min. SAP HANA CloudBeginnerSAP HANA Cloud SAP HANA DatabaseSAP HANASAP HANA Express Edition

You will learn

  • βœ”How to install Go
  • βœ”How to create a Go application that queries a SAP HANA Database

Prerequisites

Prerequisites

  • You have completed the first 3 tutorials in this mission.

Steps

Intro

Go is an open-source programming language developed by Google to increase productivity among programmers. For more information, see the Go Documentation.


Step 1 Install Go
β€”

The first step is to check if Go is installed, and if so, which version. To do so, enter the following command:

Shell
go version

go version
go version

If Go is installed, then it will return the currently installed version, such as 1.22.1.

For further details on supported versions, see SAP Note 3165810 - SAP HANA Client Supported Platforms.

If it is not installed, download it from Download Go, run the installer, follow the provided instructions, and ensure that Go is in your path.

On Linux, follow the instructions for the appropriate Linux version such as the Installing Go for openSUSE.

In order for the shell to recognize that Go has been installed and for any go commands in future steps to be recognized, a new shell window needs to be opened.

Step 2 Configure the environment
+
Step 3 Create a Go application that queries an SAP HANA database
+
Step 4 Debug the application
+
Step 5 Knowledge check
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 5
1. Install Go 2. Configure the environment 3. Create a Go application that queries an SAP HANA database 4. Debug the application 5. Knowledge check

Learn more →