SAP HANA – Sample Dataset

Hello Everyone,

We always believe, it is easy to remember the things better when we actually work on system rather than just reading the concepts.

This is one of the reason why we have created ‘Introduction to modeling in SAP HANA’ and explained the models and tables we will be using to showcase the modeling capabilities in SAP HANA.

We thought it would be even better to provide you with the table structures along with the sample dataset that we had used to build our models so that everyone can practice in their respective systems.

 

Below are the tables we have used to build the modeling objects like attribute views, analytic views, calculation views and decision tables in SAP HANA.

  • CUSTOMERS
  • EMPLOYEES
  • OFFICES
  • ORDERDETAILS
  • ORDERS
  • PAYMENTS
  • PRODUCTLINES
  • PRODUCTS

Use the below button to download the folder which can be imported to your SAP HANA system that contains above tables and its data.
SAP HANA DATA

You can import this using the ‘Import’ option available in ‘Quick View’ screen when you are in ‘Modeler’ perspective of SAP HANA Studio. Please go through ‘Quick View screen in SAP HANA Studio – Part2’ to know how to import the table and data into SAP HANA system.

Once you import the tables using ‘import’ option, system creates schema called ‘SAP_STUDENT’ and stores the table’s structures and data in it.

If you would like to have tables in your own schema rather than SAP_STUDENT, you can use the below SQL statements to create the similar tables in your schema.

Use the below button to download the SQL Statements that contains below code.
SQL Statements

Create Statements:

<SCHEMA_NAME>: We need to replace this with our own schema name before we run the below statements.

CREATE COLUMN TABLE <SCHEMA_NAME>.CUSTOMERS LIKE “SAP_STUDENT”.”CUSTOMERS” WITH DATA;

CREATE COLUMN TABLE <SCHEMA_NAME>.EMPLOYEES LIKE “SAP_STUDENT”.”EMPLOYEES” WITH DATA;

CREATE COLUMN TABLE <SCHEMA_NAME>.OFFICES LIKE “SAP_STUDENT”.”OFFICES” WITH DATA;

CREATE COLUMN TABLE <SCHEMA_NAME>.ORDERDETAILS LIKE “SAP_STUDENT”.”ORDERDETAILS” WITH DATA;

CREATE COLUMN TABLE <SCHEMA_NAME>.ORDERS LIKE “SAP_STUDENT”.”ORDERS” WITH DATA;

CREATE COLUMN TABLE <SCHEMA_NAME>.PAYMENTS LIKE “SAP_STUDENT”.”PAYMENTS” WITH DATA;

CREATE COLUMN TABLE <SCHEMA_NAME>.PRODUCTLINES LIKE “SAP_STUDENT”.”PRODUCTLINES” WITH DATA;

CREATE COLUMN TABLE <SCHEMA_NAME>.PRODUCTS LIKE “SAP_STUDENT”.”PRODUCTS” WITH DATA;

Check Table Count:

Run the below statements to make sure, we have all the tables copied to our own schema with all the records.

SELECT COUNT(*) FROM <SCHEMA_NAME>.CUSTOMERS;

SELECT COUNT(*) FROM <SCHEMA_NAME>.EMPLOYEES;

SELECT COUNT(*) FROM <SCHEMA_NAME>.OFFICES;

SELECT COUNT(*) FROM <SCHEMA_NAME>.ORDERDETAILS;

SELECT COUNT(*) FROM <SCHEMA_NAME>.ORDERS;

SELECT COUNT(*) FROM <SCHEMA_NAME>.PAYMENTS;

SELECT COUNT(*) FROM <SCHEMA_NAME>.PRODUCTLINES;

SELECT COUNT(*) FROM <SCHEMA_NAME>.PRODUCTS;

Grant access to _SYS_REPO user:

Run the below statement to provide SELECT, EXECUTE and UPDATE access on your schema to _SYS_REPO user.

GRANT SELECT,EXECUTE,UPDATE ON SCHEMA <SCHEMA_NAME> TO _SYS_REPO WITH GRANT OPTION;

Note: If we don’t run the above statement and create modeling objects on the tables from this schema, then we get below error when we try data preview after activation.

Error: SAP DBTech JDBC: [258]: insufficient privilege: Not authorized.

Drop Schema:

We can drop the schema SAP_STUDENT using the below statement which has been created by system when we imported the folder using ‘import’ option.

DROP SCHEMA SAP_STUDENT;

Thank you for reading and hope this information is helpful. Please do share with your friends if you feel the information is useful.

Happy Learning.

Check Also

Capture

SAP HANA Reporting – Connectivity Options

Hello Everyone, Once we have data transformed based on the business requirement in our data …

11 comments

  1. Very very useful information on Sap Hana.. Thanks a lot..

  2. Very useful data set, thank you for sharing this!
    Have you somewhere published several cases/assignments based on this data set?

    Kind Regards,

    Jeroen

  3. Hi Team,

    I am unable to import the above XML files into HANA system . Could you please guide me to do so.

  4. hum..

    cannot import…

    should I choose “import” -> “General” -> “Archive” or “Import” -> “SAP HANA Content”?

    thanks,

    J

    • Found it, “Import” -> “SAP HANA Content” -> “Developer Mode” -> Content -> SAP HANA Data …
      Add everything to right… then you are good to go!

      • Hi Jim,

        I was about to reply to your comment. Anyhow you got it, excellent.

        If you are interested in learning SAP HANA Modeling end to end, we have put together an excellent e-learning course for SAP HANA Modelers, you can check the content in below url:

        http://courses.sapstudent.com/courses/sap-hana-complete-course-for-modelers

        Have a happy learning,

        SAP Student

        • Ooops, too earlier to celebrate…

          Always an error: “Noting to import” 🙁

          • Hi Jim,

            Please follow path Import –> SAP HANA –> Catalog Objects..

            Select folder ‘SAP HANA DATA’ (which is extracted from downloaded file) and then add all the tables to the right side.

            The path you mentioned was to import SAP HANA Models.

            Regards,
            SAP Student.

  5. Hi,
    Thanks for your tutorial.
    I followed the path Import –> SAP HANA –> Catalog Objects.. and selected the folder ‘SAP HANA DATA’ (which was extracted from the downloaded file), but there was no right side to add tables to.
    When I click next in the wizard, I get an error message – index and export folder not found.
    Please help
    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

five + ten =