Quantcast
Channel: SCN : Blog List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 676

Generating mock-data for SAP HANA part 3/3

$
0
0

The blog post published last week deals with generating of mock-data within the XS engine for static applications. Finally with this last post, our journey through different ways of generating data on HANA ends. Last but not least I´d like to show you how to approach data generation for dynamic applications (e.g. an IoT application).

 

Data generation with the XS Scheduler and an own XSJS algorithm in a HANA XS environment

 

Requirements:XSJS coding skills, Rights to access the involved schemas and the corresponding database tables
Benefits:

Interact with the HANA database in a very easy manner, Flexibility concerning data generation (it´s you who creates the generation algorithm),

Combines advantages of part 1 and part 2, Avoids using external tools

DownsidesYou have to code everything on your own --> can result in more complexity, Consumption of HANA ressources for data generation may slow down your XS instance

 

Data generation for a dynamic application requires the creation of data in a flexible way. However it is necessary to create data records over and over again.

Therefore the HANA XS environment provides a framework component called XS Scheduler.


It allows you to schedule the execution of XSJS programms once or several times (e.g. every minute). This gives you the opportunity writing your own data generation algorithm and following this, simulating a change of sensor data. It leads to a more exciting experience for your audience watching the application in action.

With following figure I´d like to visualize this concept and show you how I have realized data generation for an IoT application.


XSScheduler.png

 

Own experiences and recommendations from my side

 

Using one of the first two variants for generating data (for a static application) is completely sufficient. Please keep in mind whether you want to verify the performance of your application or not ( --> For veryfying purposes I´d prefer to use the first Java application).

Creating and simulating an Internet-of-Things scenario requires another proceeding. For me the way of using the XS Scheduler was the only possible and most easiest one. Another thinkable alternative would be using Java, to code your own external application, which avoids the consumption of HANA XS ressources.The usage of the JDBC interface gives you the possibility to connect it to the HANA database. However you need coding skills in this language. Be aware of hosting this application on a different framework/host than your HANA XS might be necessary (Yes, there is a possibility to deploy Java applications on SAP HANA. For a better controlling of the data generation process I´d suggest hosting it on a client, spearated from HANA). Under circumstances this might be more difficult than using the HANA XS Scheduler and the solution I´ve used.

 

All in all, HANA offers you several ways you can use for achieving your goal in generating mock-data. It´s up to you to try them out and find the solution that fits to your scenario most. I hope I could give you a short but sufficient overview about different approaches . If you have any questions concerning this blog post series, please don´t hesitate to contact me ... ;-)


Viewing all articles
Browse latest Browse all 676

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>