You are on page 1of 10

How to Generate Test data for SAP HANA

User guide for a sample Java application

........................................................................................................................................................................................................................................................................................................................................................... 4 Welcome screen ................................................................. 3 TARGET AUDIENCE .......................................... 6 Data Range screen ....................................................................................................................................................................................... 3 BACKGROUND .................................................................................................................... 9 CONCLUSION ............................................................................................................................................................................................................................................................How to Generate Test data for SAP HANA TABLE OF CONTENTS DOWNLOAD .......................................... 7 Insert Options screen .................................................. 4 System Login Screen .......................................................................................... 5 Select Table screen .................................................................................................................................................... 9 2 ............................................................................................................................ 6 Select Columns Screen ..................................... 3 RUNNING THE APPLICATION .................................................................................... 3 PRE-REQUISITES .........................................................................

and can be downloaded here. The SAP HANA DataGenerator tool. DOWNLOAD The executable HDBDataGenerator. For users that can upload files to the HANA appliance at the OS level I would recommend taking a look at SAP HANA’s IMPORT FROM SQL statement as it can be heavily parallelized and I expect would perform better as it is running directly on the HANA server itself. 3 . included with this How-To Guide.jar file is available for download. or. it can be necessary to generate large volumes of test data to ensure HANA applications will meet the business user’s key performance indicators in a production environment. PRE-REQUISITES Java Runtime Environment (JRE) 6 or higher is required. at users that are not familiar with writing stored procedures. I would expect that a stored procedure running directly on the database would perform better than this DataGenerator. rather than sending data through a client application such as this DataGenerator which uses a JDBC connection .6 application using Eclipse Juno edition. however may not have Linux operating system (OS) access to the HANA appliance itself. and experience with. and cannot upload text files.How to Generate Test data for SAP HANA During the test and design phase of the software life cycle. writing stored procedures within SAP HANA. with applications such as SAP HANA database. provides one approach to quickly insert test data into an SAP HANA database. TARGET AUDIENCE This application is targeted at database users that can insert data into SAP HANA. For users that have access to. It is written using Eclipse’s jface libraries. leveraging the WizardDialog framework. BACKGROUND The SAP HANA DataGenerator application was written for Java 1.

There is no user input required on this screen.jar file into its own folder. for example C:\Utilities\ To run an executable . as shown: java –jar HDBDataGenerator.How to Generate Test data for SAP HANA RUNNING THE APPLICATION Download and extract the HDBDataGenerator. Data Ranges. and run the following statement. Welcome screen The Welcome screen (see Figure 1 below) is the first screen of the HANA DataGenerator application. System Login.jar The HANA DataGenerator is a Java GUI wizard-based application with six (6) screens: Welcome.jar will launch the application in a new window showing the Welcome screen. Running the executable HDBDataGenerator. ensure that you have the JRE bin folder added to the operating system’s path. other than clicking the “Next >” button to move to the System Login screen. and Insert Options. Select Columns.jar file. Select Table. Figure 1 4 .

How to Generate Test data for SAP HANA System Login Screen The System Login screen (see Figure 2 below) is the second screen within the HANA DataGenerator application. and on nd rd the ‘Additional Properties’ tab you’ll see the host name. choose ‘Properties’. 5 .  User ID: – This is the HANA database user.util. launch SAP HANA Studio.Preferences classes. It’s possible that this screen will be skipped if there is already a valid saved connection available. select ‘Database User Logon’ from the list on the left.  Password: – This is the database users’s password. followed by 5 digit port. right click on the HANA system. The Remember these settings button will save this information to be re-used next time the HANA DataGenerator application is run. If these inputs are unknown. The 2 and 3 digits are the instance number.  Instance #: – This is the two-digit instance number (multiple installations of HANA may exist on a single host.prefs. If this screen is unintentionally skipped. It is saved using the java. Note: The saved information is not encrypted. click “< Back” to return to it. The Clear Systems button will clear any saved systems. This user needs to have insert SQL privilege to insert data. Figure 2 There are four (4) pieces of required user input on this screen:  Host Name: – This is the fully qualified machine name where the HANA database is running. the instance number is used to distinguish them). open the Administration Console perspective.

check one or more of the boxes in the first column. Not every column in the table needs to be populated with data. 6 . the Select Columns screen prompts the user to select which columns are to be populated. When a table is selected. HANA has both row. the “Next >” but is enabled which progresses the application to the Select Columns screen. To enable the “Next >” button.How to Generate Test data for SAP HANA Clicking the “Next >” button will attempt to login to the HANA database. User input on this screen requires selecting a table. which can be subtly distinguished by their icon.and column-store tables. Select Columns Screen The Select Columns screen (see Figure 4 below) is the fourth screen of the HANA DataGenerator. Expand the tree and select a table to enable the “Next >” button. Select Table screen The Select Table screen (see Figure 3 below) is the third screen of the HANA DataGenerator. A successful login will proceed to the Select Table screen. Figure 3 Notice in the screenshot above the context menu at the schema node to allow filtering to more quickly and easily find specific tables by using a LIKE style filter.

7 .How to Generate Test data for SAP HANA Figure 4 Note: The “Not Null’ column denotes the columns which require a value. Click the “Next >” button to continue to the Data Range screen. In this screen the user chooses for each column what type of data to generate. and cannot be deselected. Data Range screen The Data Range screen (see Figure 5 below) is the fifth screen in the HANA DataGenerator application. The Key column denotes the field(s) that make up the table’s primary key. and they are selected automatically.

8 . however they can be loosely grouped into the following categories:  Character strings  Date/Time  Binary  Numeric HANA DataGenerator creates data for character string columns as either a fixed Auto-generated value.How to Generate Test data for SAP HANA Figure 5 There are many data types within SAP HANA. or a fixed user-entered custom value. Clicking the “Next >” button will progress to the Insert Options screen. The lower value prompts the user to select a file from the operating system. Note that incomplete data range information will show an error in the last column. the “Lorem ipsum…” values are Autogenerated. whereas Fixed allows for only the single lower value. From the screenshot above. and not allow progressing to the last page. it is not encourage to save (large) binary files within the database itself. HANA DataGenerator has three options for both Date and Numeric data types: Random. Although not shown in the screenshot above only a Browse option is available for Binary data types. whereas the fifth column has a custom value entered as “This column will have my…”. Sequential and Fixed. Note: As SAP HANA database licensing is based on memory-usage. Random and Sequential options require both a lower value and an upper value to be entered.

Figure 6 To enable the “Finish” button. Enabling this option will commit the data after each batch instead of committing the data after all batches have completed. Display Progressbar Run the insert statements in a background thread so that they can be canceled. Click “Finish” to start inserting the data into the table. can be a useful and efficient way to generate large amounts of data for testing the performance of an SAP HANA database.How to Generate Test data for SAP HANA Insert Options screen The Insert Options screen (see Figure 6 below) is the sixth and final page of the HANA Data Generator application. through a simple Java application such as this SAP HANA DataGenerator. Commit each batch Rows to insert can be split into batches and sent to be written in blocks instead of one row at a time. 9 . the Number of rows to insert and the Batch size values require entries. Progress for each batch is shown. The following three options are available: Option Truncate table Description Clear existing data from the table before inserting the test data. CONCLUSION Using the SAP HANA JDBC driver.

National product specifications may vary. Business Objects and the Business Objects logo. StreamWork. Web Intelligence. These materials are subject to change without notice. SAP HANA. Crystal Reports. PartnerEdge. BusinessObjects. SAP BusinessObjects Explorer. iAnywhere. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services. ByDesign. . Crossgate is an SAP company. Sybase and Adaptive Server. All other product and service names mentioned are the trademarks of their respective companies. Sybase is an SAP company. and SAP Group shall not be liable for errors or omissions with respect to the materials. SQL Anywhere. m@gic EDDY. if any. SAP. All rights reserved. and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase Inc. Duet. R/3. B2B 360°. Crossgate. Data contained in this document serves informational purposes only. Xcelsius. Sybase 365. Business Objects is an SAP company. SAP NetWeaver. Nothing herein should be construed as constituting an additional warranty. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only. Crystal Decisions. and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd.com © 2012 SAP AG. and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. without representation or warranty of any kind. and B2B 360° Services are registered trademarks of Crossgate AG in Germany and other countries.sap.www.