Skip to Content

Import Data into SAP HANA Cloud, SAP HANA Database

Learn in this tutorial how to use the SAP HANA Database Explorer to import the sample data needed for this mission from a tar.gz file.
You will learn
  • How to import catalog objects from your local machine to your database using the SAP HANA Database Explorer
chriskollhedChristopher KollhedAugust 29, 2021
Created by
VijayKrishnanSR
August 3, 2021
Contributors
VijayKrishnanSR
chriskollhed

Prerequisites

Alex Banner

Reminder: This tutorial is part of a mission, in which you will help Alex, the CEO of Best Run Travel, to answer a concrete business question with SAP HANA Cloud, SAP HANA database.

Alex needs to know the top 5 partners of their agency and wants to find out the days with maximum booking of each partner.

This mission consists of 9 modules that contain the necessary steps you need to follow in your mission to help Alex:

  1. Start using an SAP HANA Cloud trial in SAP BTP Cockpit

  2. Provision an instance of SAP HANA Cloud, SAP HANA database

  3. Tools to manage and access the SAP HANA Cloud, SAP HANA Database

  4. Create users and manage roles and privileges

  5. You are here

  6. Query the database using SQL statements

  7. Create a development project in SAP Business Application Studio

  8. Create a calculation view

  9. Grant access to Calculation Views

In this tutorial, you will learn how to import data to your SAP HANA database in SAP HANA Cloud.

You can follow the steps in this tutorial also by watching this video:

About this video

This video is meant as additional support material to complete the tutorial. However, we recommend that you only use it for visual guidance but primarily focus on the written steps in this tutorial.

  • Step 1

    SAP provides a free data model focused on flight data for anyone to use. We’re going to import this sample data and use it to help you complete the mission for Best Run Travel.

    Download the SFLIGHT sample data from the public SAP GitHub repository and save it on your local machine.

    Note the location of the file.

    Log in to complete tutorial
  • Step 2
    1. Open SAP BTP cockpit or SAP HANA Cloud Central.

    2. Click on your instance and select the option to Open the SAP HANA Database Explorer.

      Open the SAP HANA Database Explorer
    3. The SAP HANA Database Explorer will open in a new tab.

    Log in to complete tutorial
  • Step 3
    1. In the pane on the left, expand your database and right-click on Catalog.

    2. Click on Import Catalog Objects.

      DBX - import catalog objects
    3. Where it says Local archive, click on Browse and select the SFLIGHT file you previously downloaded to your local machine.

      Browse
    4. Wait until the archive is uploaded completely. You can see the status of the upload next to the Browse button.

      DBX uploading archive
    5. Once the upload is completed, you will see a list of Catalog Objects. All of the objects will be automatically selected for import.

      DBX catalog objects
    6. Keep all options as they are and then click on Import.

    7. Once the import is completed, you will see a confirmation notification on the top right-hand side of the screen.

      DBX import completed successfully
    • Note that you can also import individual .csv files in a similar manner. Simply right click on Tables in your catalog and select Import Data.

      Import CSV1
    • A wizard will guide you through the steps. You can select to add the data to an existing or new table and which schema the import should happen in.

      Import CSV2.png
    • You will then be asked to specify the column mappings as well as how errors should be handled.

      Import CSV3.png
    Log in to complete tutorial
  • Step 4

    Once the data is imported, you can take a look at it.

    Click on Tables to view all your newly imported tables. Please note that your data will be automatically stored in a new schema, called SFLIGHT.

    To make sure you can see your new tables, click on the Choose Schema button next to the schema name on the bottom left-hand side panel.

    view tables - change schema

    Then select the schema SFLIGHT. You can uncheck the default DBADMIN schema to see only the SFLIGHT tables you just imported.

    Select Schema

    Click OK and the list of available tables will be displayed on the same side panel.

    View Tables

    If you want to see the data inside any of your tables, you can right click on any of them and then click on Open Data.

    Open Data

    This will open the table on the main panel.

    Data Preview resized

    Feel free to browse the dataset now to get an overview of the data available.

    Well done!

    You have completed the fifth tutorial of this mission! Now you know how to import tar.gz files to your database using the SAP HANA Database Explorer.

    Learn in the next tutorial how to query the data.

    Log in to complete tutorial
  • Step 5

    What schema is the sample data you imported located in?

    Log in to complete tutorial
Back to top