DISCLAIMER: I’m not an SAP HANA expert or an R expert, not even a Python expert. I’m just a guy with a lot of ideas who loves to write blogs.
The other day I was thinking about making some nice with SAP HANA and R, because people doesn’t seem to be enough interested in R yet, and that’s a real shame…R is just awesome and SAP HANA is more awesome…so bringing them together is…I think you got the idea…
First thing that came into my mind was a survey…first name, last name, country, age, sex and a favourite programming language…of course…I need a lot of records…more that I could generate by hand…so…a Python script came to the rescue…I thought…why I don’t take my team’s names and last names, countries of origin, made up some ages and other things just to fill up the mix. The script will basically generate random entries that will get loaded into SAP HANA.
The execution is fair simple…we pass the schema and the number of files we want to generate…for this blog…200,000 records sounded like a good deal.
DROP TYPE T_VOTES_DETAIL;
When everything is ready, we call the GET_VOTES() procedure which is going to read the 200,000K records from SAP HANA, send them to our R server to process the data and then send it back to SAP HANA to fill up a table with the information we want to take care of.