OK, I know this is a cheesy title - but as I am writing parts of this from my hotel room during my annual kiteboarding trip to Maui, I just could not resist...
Yes, indeed. This is yet another one.
What's different here, this document is meant solely for developers and it doesn't even try to cater to CIO's, system architects, business experts, database admins and alike. If you're not a developer (or consultant building data-centric applications for your customer; or a data analyst), you may still get something out of this collection, but maybe you won't. If you are a developer (and you probably are, because after all you came to the SAP Developer Center), I hope you will find this useful...
So what would you have to read, watch, use to get up to speed with SAP HANA when you're a developer? I hope I found the most relevant documents. If I missed anything, let me know in the comments and I will update the list.
At it's very core, the SAP HANA DB is "just" a relational database. It really is so much more, but before you dive into that, make sure you know your SQL. So make sure you have the SQL 92 Specification available, and if necessary, find a SQL tutorial on the Web - or let me Google that for you.
It all starts with Hello World. So let's get done with that: on HANA, you would write is as
SELECT 'Hello, World!' FROM DUMMY;
OK, looks easy. Only one problem - maybe you don't have a HANA box to follow along... Well, you came to the right place!
You can get your own HANA DB server, running on Amazon Web Services. No license fee, you just pay AWS for the hosting cost.
If running your own HANA on AWS sounds like too much of an investment for now, there is even a completely free option - a free 30-day trial of SAP HANA, including some of the frontend tools such as Business Objects Explorer or Visual Intelligence. There's a brilliant blog SAP HANA Developer Access Beta program - get the best out of your test-drive! by community member R. Konijnenburg that will help you get started on the trial.
So now that you have absolutely no excuse for not following along, what are the documents you should read first?
If highly recommend to start with the SAP HANA Database - Development Guide on http://help.sap.com/hana_appliance (the official product documentation page). This guide provides a solid architecture overview and a tutorial that covers data load, modeling techniques, SQLScript basics and even some hints for performance optimization. Plus, the HANA team keeps the document up to date and in sync with the latest product revision. So make sure you check frequently for new versions of the document. BTW, the HANA trial mention earlier has the sample data set used in the Development Guide already loaded. So you can jump right into modeling...
Done with the first tutorial? Maybe you want to try a little bit yourself now. Let's spend a little more time with SQL, modeling and SQLScript before moving on to more advanced topics. The SAP HANA SQL Reference Guide will certainly make it into your browser favorites list. I prefer the HTML version, but the SQL Reference Guide is available in PDF format, too.
Prefer some more guidance? Or maybe you like a recording better than reading through a looooong document? Check out the HANA Academy - you will find short videos that show you "how it's done". There is already a nice selection of video tutorials, and growing. HANA Academy a cornerstone of the HANA Distinguished Engineer Program and is meant to take you from your first steps all the way to HANA mastery.
Speaking of "mastery" - it's probably time for your next steps now...
Getting to the data...
When working with a database, sooner of later you will face the problem of how to get data in and out. Let's start with "in":
- The easiest way to get some test data into HANA as a developer, is to just upload it from a CSV or XLS file in HANA Studio. It's probably so easy that it doesn't deserve any special documentation. File > Import... > SAP HANA Content > Date From Local File. That's all you need to know.
- The easiest way is quite often also the least flexible way and comes with limitations. E.g. as of SPS04, the data upload from HANA Studio will fail when there is problems with the data. The db commit is for the entire file and it doesn't write any meaningful error logs. So if it works, it's great and simple, if it doesn't, it provides little information on what went wrong. Also, it's better suited for relatively small files. But - you can also upload data that you store on the HANA DB server (or any remote disk that is mounted on the HANA DB server via NFS or alike). The SAP HANA SQL Reference Guide has the latest documentation on the SQL Statement IMPORT FROM, and that's exactly what you need. The video blog How to load CSV files into HANA is a bit outdated (e.g. you don't need those control files any more), but gives you a nice head start.
- Moving from a one-off upload of some test data to continuous data load, you might want to try an ETL tool. SAP bundles SAP Business Objects Data Services (BODS) into SAP HANA Enterprise Edition (and upwards). BODS lets you move data from all kinds of sources (files, databases, ABAP backend systems, ...) into SAP HANA. As far as BODS is concerned, HANA is just "another database" - so your best starting point is the BODS documentation on http://help.sap.com/bods. But there's even more: e.g. check out how you can call HANA Stored Procedures from BODS here
- Now, when you are approaching HANA from an SAP Background, you will most likely want to know how to move data over from a Business Suite backend system. Data Services works (see last bullet point). But you want to get the real real-time feeling and replicate data from an ABAP system at the very second it changes. The tool SAP HANA uses for read-time data replication is called "Landscape Transformation" (because it existed before HANA and has never been rebranded in the HANA context. Quite unfortunate if you ask me...). The Landscape Transformation (LT) Replication guides (Technical Operations Manual and Configuration Guide) show you how it's done. As of now, SAP does not offer any developer licenses for BODS or LT - so if you want to get experience with these, you would either have to attend a training class or find a license at your company or customer.
- And of course, you can use the various client SDK's to build you own data load programs. Install the SAP HANA Client and you will get drivers/SDKs for JDBC, ODBC, Python ("not supported"), ABAP and more. You will need those client drivers and I'll point you to relevant documentation in the next section...
Programming HANA Client Applications
SAP has already a lot of HANA Client Applications available for you. The "biggest" one is most certainly BW on HANA. The most interesting ones for developing analytical applications are probably our BI tools: SAP Predictive Analytics, SAP Visual Intelligence, the BI Platform 4.0.
But there's even more for developers: HANA comes with client libraries for various popular programming environments. You can use these libraries (e.g. the JDBC and ODBC libs) to connect 3rd-party BI frontend tools to SAP HANA - just like Ronald Konijnenburg connected HANA to Tableau and Tibco Spotfire.
And you can also use these client libraries to program your own applications:
- JDBC is described in the SAP HANA Database - Development Guide - and you should of course have a basic understanding of JDBC
- ODBC/ODBO is mostly associated with showing SAP HANA Data in MS Excel - but of course you can also use it as a programming interface. Maybe Blag's efforts to Bring some Euphoria to SAP HANA inspire your own experiments (strong suggestion: follow Blag on SCN)
- Although it's not officially supported (so try at your own risk, and not in production environments), HANA also comes with Python drivers, implementing the Python Database API. Again, it's Blag who can get you started with this in SAP HANA and Python? Yes Sir!
- And of course, SAP never forgets where we come from: you can use SAP HANA from ABAP. Yes! When it comes to ABAP, there's only one Thomas Jung. Luckily, Thomas has joined the SAP HANA Product Management team, he is now writing about HANA and he has not yet forgotten his ABAP - as you can see in Developer's Journal: ABAP/HANA Connectivity via Secondary Database Connection and Developer’s Journal: HANA Catalog Access from ABAP (another strong suggestion: follow Thomas Jung on SCN)
Built your first own application on top of SAP HANA? Great! Let's make the final steps towards HANA mastery and see how you can hack the heck out of SAP HANA:
Advanced HANA Programming
I mentioned earlier that HANA is "so much more than a relational database" - let's look into some of the more advanced topics:
- Did you know that HANA supports full-text search and hence can bridge the gap between what is commonly referred to as "structured" (tables with fields as you typically find it in relational databases) and "unstructured" (just text) data? The Fuzzy Search Developer Guide provides information on how to - well, the title says it all - how to do fuzzy searches on text data
- One of the most interesting features of HANA is the integration of statistical functions (the so-called Predictive Analytics Library - PAL) and business functions (Business Function Library - BFL) in the core of the database. Check out the Predictive Analysis Library-Reference Manual and the Business Function Library Manual.
[I highlighted this section, because in my humble opinion, this is about the coolest part of SAP HANA. HANA has create potential as a lightning fast database - but these libraries are a great example for SAP HANA being more than a database.]
- Except for writing the wrappers around PAL/BFL, don't worry too much about the L-language at this point. It will most likely undergo significant simplification before rolled out to a broader developer audience (if at all). Future versions of PAL/BFL calls will most likely not even need those wrapper anymore, but be integrated more naturally in SQLScript.
- In case the PAL doesn't provide the statistical analysis function you want to run on the data - you can be quite sure the popular statistical programming language R will. So if you are really into math, check out HANA's R-integration. For licensing reasons, we cannot bundle R with HANA, but it's quite easy to install - the HANA Documentation has a guide for that, and my colleague Blag has written a blog to make your first steps very easy.
Where to go from here
Well, if you worked through all this material, you must be a HANA Guru by now (and if you still want to learn more and read, read, read, here is a collection of even more documents that you can download and work through). I must also assume that you do have additional practical experience with HANA implementation projects, because you wouldn't spend months of your life learning some technology that you don't apply to real problems.
So I guess you'd be a perfect candidate for the HANA Distinguished Engineer program. So share what you know right here on the HANA Developer Center, contribute to the HANA Academy, get some recognition and build your own personal brand in HANA-land. You can be sure that good things will happen for you...
Hey, and what in case you out-grow the pure developer instances and you (or your company) want to go live with HANA? Or you want to become an SAP HANA Partner? http://www.experiencesaphana.com/ is where you want to go:
- You'll find information on the business value of SAP HANA, Customer Success Stories and a whole lot more, and you can contact the SAP HANA Sales team
- You'll find pointers to SAP HANA One, and offer that allows you to operate SAP HANA on Amazon Web Services in production! And it's even self-service, you will never have to pick up the phone and talk to a sales representative (if that's not your kind of thing).
- And you'll find information on how to join the SAP HANA Partner Program.
And last but not least: this summary of resources is my personal selection - I may have missed some great documents. I may have mis-judged some documents. And I may have intentionally left out some documents because of my own bias. So help me complete the list by pointing all of us to more interesting stuff (please, please: limit the suggestions to resources that are interesting for developers. "How to configure High Availability with HANA and xyz storage technology" is a fascinating topic, but not relevant when you're building an application) in the comments.
Have fun with SAP HANA!