SAP

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Visualize Spatial Data in SAP HANA Cloud Using Jupyter Notebook

Connect your Python script from Jupyter Notebook to SAP HANA Cloud, SAP HANA database, creating a visualization of spatial data in SAP HANA Cloud.

Overview

You will learn

  • How to create a connection between Jupyter Notebook and database instance
  • How to load CSV data into pandas data-frame
  • How to create a table in database instance from pandas data-frame
  • How to create data visualizations in SAP HANA Cloud, SAP HANA database
Thomas Jung T Thomas Jung August 21, 2026
Created on August 8, 2021
Contributors

More from Thomas Jung

See all 226 tutorials by Thomas Jung →

Prerequisites

Prerequisites

  • Make sure that you have a running SAP HANA database instance in SAP HANA Cloud.
  • Download the sample data “travelroute.zip” file from GitHub repository

Steps

Intro

There are many data driven applications that can be developed by using the SAP HANA database instance in SAP HANA Cloud with any other development environment, such as Jupyter Notebook.

In this example, we’ll focus on creating a Python 3 file on Jupyter Notebook and connect it to our database instance. Once the connection is created, then we can add data to the instance or access data stored in the instance.

By connecting Python files to your database instance, it also possible to use machine learning capabilities.


Step 1 Setup the environment for connection

Before you get started, make sure you have Anaconda installed on your system. You can install Anaconda from here.

You can also use Jupyter Notebook from Visual Studio. If you prefer to use Visual Studio with Anaconda, you can install Visual Studio Code from here.

To work with Jupyter Notebook, you must activate an Anaconda environment in VS Code. To select an environment, use the Python Select Interpreter command from the Command Palette (Ctrl+Shift+P). Once the appropriate environment is activated, you can create and open a Jupyter Notebook.

In this tutorial, you will see an example of Jupyter Notebook from Anaconda.

Step 2 Install packages
+
Step 3 Import packages for creating a connection
+
Step 5 Load data from a csv into a pandas data-frame
+
Step 6 Create a database table from pandas data-frame
+
Step 7 Access the table from Jupyter Notebook
+
Step 9 Test yourself
+

Resources

Discussion

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

Submit detailed feedback Discuss in Community
Steps
Step 1 of 9
1. Setup the environment for connection 2. Install packages 3. Import packages for creating a connection 4. Create a connection to database instance 5. Load data from a csv into a pandas data-frame 6. Create a database table from pandas data-frame 7. Access the table from Jupyter Notebook 8. Explore data visualizations 9. Test yourself
Next