Skip to Content
Technical Articles

HOWTO – Import SFLIGHT sample data into SAP HANA from a local computer

Out of the box, SAP HANA does not include any sample data. When getting familiar with and learning the platform, it’s often useful to have some to play around with as you get a feel for HANA before beginning some real work with it.

 

SAP provides a free data model focused on flight data for anyone to use. You can download the data here: https://github.com/SAP/hana-xsa-opensap-hana7/raw/snippets_2.3.2/ex2/sflight_hana.tar.gz

Below, I’ll be walking you through the steps on how to import the data into HANA from your local machine.

 

  1. Make note of where your downloaded archive is. You’ll need to know this to find it later.

 

  1. On the SAP Web IDE for SAP HANA, open the Database Explorer view. If you haven’t already, connect to the database you wish to import the data into. Press the Add button to do so.

  1. Add a new database connection by filling out the required fields as appropriate for your database. The only difference for a tenant on a multi-tenant database is the need to specify which tenant you wish to connect to.

  1. After selecting your newly connected database, right-click on the Catalog folder and select Import Catalog Objects

  1. From your local machine, click Browse to navigate to where you downloaded the flight data. After a few moments, the file should be uploaded, and you can select all Catalog Objects within it to import by checking the box at the top of the table. Once you have, you can click.
  1. It will take another few moments for the data to be imported into HANA. After, you should be able to expand the database and click Tables to view all the newly imported table schema. Right-click on one of them like SFLIGHT and select Open Data to view it all.

 

Congrats! You’ve now added a wealth of data to your HANA instance and are ready to explore and learn with it. Once you have some substance to work with, it’ll be much easier to experiment with all the functionality that HANA has to offer — enjoy!

13 Comments
You must be Logged on to comment or reply to a post.
  • Hi Matteo,

     

    I got stuck on step 2 as I don’t see the icon for adding database connections:

    What’s next? 

    Thanks, greg

    P.S. I’m all set as Thomas Jung has provided the next step here: https://blogs.sap.com/2018/09/13/build-database-objectsservices-in-hana-service-using-sap-webide-full-stack-part-1/

     

     

  • I am getting this error “An error occurred while performing a catalog import (dberror) insufficient privilege: Not authorized”-

    Can you please help which roles/ authorization objects are required for this?

     

     

    • Jim Varrati can you please explain how you added as technical user? I am still facing the issue…It would be really appreciated if you can provide steps to add as technical user.

      Thanks in advance 🙂

  • This is what worked for me, the older courses they were using just the privileges now they are using a role so first make sure you install the SFLIGHT in the systemdb not the HXE then using Hana client open SQL console for the sflight schema ( you can use the hana cockpit sql tool as well just make sure you are connected to sflight) then create the user and role for the exercise by executing the following statements one at a time. change the password below with what you want to use and remember because you will need to enter this when you create the service it asks for user and password. if you are using hanaexpress I believe I used 39015.

    CREATE USER CUPS_SFLIGHT PASSWORD “<Password>” SET PARAMETER CLIENT = ‘001’;
    ALTER USER CUPS_SFLIGHT DISABLE PASSWORD LIFETIME;
    GRANT SELECT ON SCHEMA SFLIGHT TO CUPS_SFLIGHT WITH GRANT OPTION;
    GRANT SELECT METADATA ON SCHEMA SFLIGHT to CUPS_SFLIGHT WITH GRANT OPTION;

    CREATE ROLE SFLIGHT_CONTAINER_ACCESS;
    GRANT SELECT, SELECT METADATA ON SCHEMA SFLIGHT TO SFLIGHT_CONTAINER_ACCESS WITH GRANT OPTION;
    GRANT SFLIGHT_CONTAINER_ACCESS TO CUPS_SFLIGHT WITH ADMIN OPTION;

    good luck let me know how you made out 😉

     

    • Hi Jim,

      I tried following your steps, but i not able to see any objects.

      I have executed all SQL statements one by one without any errors.

      is there something I have missed? I’m logged on as XSA_ADMIN in WebIDE.

      Regards,

      Henrik

  • When you say you don’t see any objects is that when you are browsing for tables in the synonym? you have the service check box checked? if that is the case then either the port is wrong or SFLIGHT is installed in the other DB, HXE or SYSTEM HanaExpress has both. If your still stuck tonight when I go home I will look at the exact port.