Announcing Jolo, a Java library for printing text-based tables

Well, I’m at it again releasing another open-source project. I work with Hyperion and the Essbase Java API extensively, so it’s not uncommon for me to be doing things with grids and working on a command-line. I frequently write lightweight command-line clients to test things out. I didn’t love the options I was able to find in Java that would help print/format a text-based table. The ones I did find were clunky and hard to use.

So, you guessed it, I rolled my own. Jolo is a small and lightweight Java library with two goals: print out text-based tables, and have a tight and clean, yet flexible API. So let’s say we want to print out names, cities, and states in a three column table. The code looks like this:

public void testPrintTableWithColumns() {

    // setup table definition with column names/widths
    TableColumnList tcl = new TableColumnList.Builder()
        .add("Name", 40)
        .add("City", 15)
        .add("State", 2)
        .build();

    // createRandomRows is a helper function in this case but would otherwise
    // be your data that is an Iterable<List<Something>>.
    Iterable<List<? extends Object>> data = createRandomRows(10, 3);

    // create the printer and print the data
    TablePrinter tp = new TablePrinter();
    tp.outputTable(tcl, data);
}

Having the TablePrinter separate from the concept of a TableColumnList is nice because we can plug-in different TablePrinter implementations if we want to. In the above example I have a helper method creating the data for me (createRandomRows()) but in your program this would be something that implements the Iterable interface and contains a List of something that extends Object. In Java parlance that means you can print anything that’s Iterable<List<? extends Object>> – note that the toString() method will be called, so you can pass anything in. If I get time I’ll enhance the API a bit to provide some convenience functions and syntactic sugar. Given some data, the above code generates this table:

+----------------------------------------+---------------+--+
|Name                                    |City           |St|
+----------------------------------------+---------------+--+
|Jason Jones                             |Seattle        |WA|
|Cameron Lackpour                        |Philadelphia   |PA|
|Tim Tow                                 |Huntsville     |AL|
+----------------------------------------+---------------+--+

Note that with a simple parameter in the builder we were able to constrain the width of a given column.

The Hyperion Connection

This isn’t ostensibly Hyperion- or Essbase-related (save for the names in my table, hehe), but if you work on the things that I work on then this might be up your alley. The Jolo page has more information including a link to the Github repository. I will likely push this to Maven Central as time permits to make its inclusion in anyone’s projects all the easier. Unlike many of my other projects, this one is not incredibly commented [yet], so that will be coming in the future weeks as time permits. The API is pretty clean though so you shouldn’t have a hard time using it. Licensed under the very business-friendly Apache Software License.

EIS, IES, and things that make you go hmm…

This will be another one of those “fun” posts that I get to occasionally do. Every now and then I check out the web traffic stats for this blog and other online endeavors and take a look at who is coming and how they are getting here.

I wrote an article years ago about my experiences with EIS (Essbase Integration Services). It has turned out, hit-wise, to be pretty popular. There’s just not a lot of information about this wonderful little tool out there.

So, naturally one of the search terms for those looking up information on EIS is either Essbase Integration Services or just EIS. Curiously, though, one of the major traffic contributors to the EIS page is actually from people typing in “Boobeis” (presumably a misspelling of “Boobies”). When searching on the former, Google seems to helpfully break up the search term into constituent parts Boob + eis and suggest my site as a result.

So, yeah. According to Google, my EIS posts get two types of visitors: those looking for information on how to build a cube from a database schema and those wanting to see naked females. Hopefully those two demographics don’t overlap… at least during work hours.

Hyperion Essbase wish list: Import a compressed file

I thought this up while attending Dan Pressman’s Kscope presentation How ASO Works and How to Design for Performance, a presentation that definitely appealed to my inner Hyperion geek. Dan did a crazy deep dive on performance tuning with particular respect to loading ASO. He had some pretty bangin hardware to play with too.

Long story short, and many of us have known this for awhile, but there are ways to format your Essbase load files so that they load faster. Basically what you are trying to do is make things easier on Essbase: stream in less data, don’t repeat things you don’t need to repeat, don’t thrash blocks in and out of memory, and so on. That’s all well and good.

The advent and proliferation of SSDs in the enterprise has done wonderful things for Hyperion performance by  eliminating a lot of the performance quirks with rotational media and penalties from fragmentation. But at the end of the day we are still looking for ways to pump ever-increasing amounts of information into our cubes even faster than we were the day before.

For instances where we are loading a file that resides on the same machine as the Hyperion apps/cubes or even across the network, I wonder what, if any, performance benefits are to be had if we had the ability to import a zip file?

Zip files can get awesome compression on text files. They can also have their uncompressed contents streamed. In other words, it’s not necessary to extract the contents of a zip file before you can read the contents (starting at the beginning). In theory, if one achieved moderate to decent compression on their zip file and handed that to Essbase (say with a specialized import data MaxL command), it would be saving time on the disk-read aspect of the data load, at the expense of some additional CPU usage. Many Essbase load operations are disk I/O bound anyway so this seems like a reasonable tradeoff to make.

As an additional benefit or elaboration on the concept, perhaps multiple text files could be placed into the same zip file, perhaps with a “load manifest” or options on the load command, and Essbase would attempt to parallelize the data load to the extent it can. This would likely be an add-on feature once the basic support is in place. In all you would need to augment the data load process with a zip file reader routine (this would be an off-the-shelf library that is quite common), a couple new MaxL import data variants, and an augmentation to the Java API. I suppose you could leave the MaxL command alone and just program the interpreter to look for a .zip extension and treat it accordingly, but it seems like it’d be the better choice to specifically indicate the data load is from a compressed file.

Of course, if you’re loading just from SQL this whole thing wouldn’t apply to you. Loading data files may seem low-tech but it’s incredibly common and often times I prefer it as I have an exact text file to tie back to, if need be, versus a possibly changing SQL data store (but that’s a conversation for a different blog post). This feature would cater to the performance nuts out there – and if Kscope is any indication, there are plenty. I’d be curious to hear anyone’s thoughts on this.

Hyperion Papercut: LCM security migration woes

Raise your hand if you’ve ever blown away your admin password when doing an LCM security migration. You there, in the back. I’m aware of this one because various of my colleagues are aware of it and they have told me to watch out.

Cameron Lackpour sent this one my way, though I was aware of it. Basically the issue is that you are migrating from server to server, presumably from development to production, and this includes user names and passwords (at least for native users). So if you migrate the development admin account to production, you blow away your production password.

So I guess you can say the tool is just doing what it’s supposed to do… but you’d think there’d be some provision on the target system that goes “Hey, maybe let’s not pave that really critical production admin user password with crap from somewhere else, mmkay?”

Anyone else out there shoot themselves in the foot with this? Or I am just missing something incredibly obvious?

Calling all Seattle Hyperion/Essbase/EPM enthusiasts!

Are you a Hyperion/Essbase enthusiast, analyst, consultant, or all of the above in the Seattle area (and the greater Pacific Northwest for that matter)? This includes Seattle, Bellevue, Tacoma, Federal Way, Everett, Issaquah, Kent, Kirkland, and everything in between (even you, Portland!). I am working on something special and I would love for you to say hello if you are in the area.

Please drop me a line!

Viva La Database Notes

I originally titled this post “The best little Hyperion Essbase feature you’re not using” but thought better of it. So, database notes. Have you ever wondered what that little Notes button in the Excel add-in does? Or rather, what it did (since even yours truly has finally made the official jump to Smart View)?

Essbase Excel add-in Database Note dialog

Essbase Excel add-in Database Note dialog

It is basically a facility for letting the Hyperion administrator set a “message of the day” on a per database basis. This message can be set manually from EAS, set via automation from MaxL, and of course, updated via the Java API. Since 99% of the cubes I am used to maintaining are wrapped with automation, the notes are a a great place to put some information about the automation process, even if I’m the only one that is going to refer to it. I honestly don’t know of any environments where even a significant portion of users is aware of or uses this feature, but I am sure there are some.

Just off the top of my head, here’s some ideas for information that can be put in the database notes:

  • Last cube refresh time
  • Rejected record stats (such as those generated by the Rejected Record Summary tool)
  • Automation stats (duration, errors, etc)
  • Next cube refresh time
  • Notes about business process calendar/schedule
  • Link to cube status information website
  • Timestamp/version information from file(s) used to load the cube
  • Indicate date of archival for an “archive” cube

As an example, I created an automation routine once that depended on files from various divisions. Each division was on its own schedule, which was denoted by an integer, typically between one and 40. It was useful to me to know which was the most recent file loaded in. I programmed the notes to contain this information, as well as some rejected record stats. So, on a day to day basis I didn’t need to refer to the notes very often, but when things went a little haywire, it was a great first place to be able to check for information before having to dig in further.

Continue Reading…

Small site updates (HTTPS!) and other tidbits

Now that I have been and am planning to post a lot more, I have found myself writing articles from the occasional airport waiting area. I haven’t been a big fan of logging in to the site admin area over unencrypted connections, so I have endeavored over the last week to install an SSL certificate, adjust the theme to be protocol relative, and move to a dedicated IP as necessitated by the SSL certificate installation.

Jason’s Hyperion Blog Available Using HTTPS

That all being said, not that it’ll affect too many people out there, but jason’s hyperion blog is now accessible over HTTPS. I think most people are using RSS readers so this won’t matter but if you have a bookmark set and want to be just a little more secure (not that I’m asking for any banking info), then you’re all set.

New Links Section

I am endeavoring to compile a nice list of links to Hyperion blogs, discussion forums (all two of them), and documentation so that I have a nice central place to refer to things. I have a raft of Hyperion blog links to add in still (keep them coming!) but if you have a cool resource to link to such as a blog of yours or one you know of, utility, or documentation, I’d love to have it and add it to the list.

Site5 Continues to be Awesome

I have been hosting this site and others with Site5 for almost a decade. I have resisted moving to one of my other servers because these people are completely awesome with support, uptime, and keeping things nice and updated. I was not surprised when they helped get a new SSL cert up and running and switched things over for me without a glitch. If you need good hosting then I highly recommend them.

Happy 4th of July!

And to all of you folks not in America – Happy 4th of July and have a great Wednesday!

Kscope13 Session Thoughts: Joe Aultman sprinkles magic Groovy dust on the Essbase Java API

There were lots of great sessions this year, as always. I tried to get outside my comfort zone a little bit and take in some new content. I thought over the next few posts I’d shine a little bit of light on a few of the sessions that were notable to me.

Fixing What’s Broken in the Essbase JAPI and Reaching New Heights with Groovy

As a programmer, this was right up my alley, naturally. This session was presented by Joe Aultman. Joe is using Groovy to do some automation that would otherwise be done with the venerable Java API. Joe, if you’re reading this, super cool presentation. In my mind I saw this presentation as being about two things: issues with a particular API and issues with a language – namely a lot of “boilerplate” Java code.

As an aside, there is something of a renaissance happening in the Java world with respect to the JVM. As a computer science guy (go Dawgs!) and general purpose programming nerd I have been keeping abreast of this language and several others, particularly Clojure. In a nutshell, what’s going on is this: Sun (now Oracle, of course) created Java many years ago. Java runs inside the JVM, or Java Virtual Machine. Whereas with a language like C or C++ you might compile your C source code into an executable meant to run on a particular system, in Java you just always compile down to the same code that in turn runs on a JVM. In other words, in theory, as long as you have a JVM available for a platform (Windows, Linux, OS X, etc), then you should be able to run the same old byte code. Hence the original notion, “Write once, run everywhere.” In practice there were and are many quirks to this, but by and large the statement is true – which is why generally speaking you are able to download Java JAR and class files that work irrespective of the underlying operating system (rather than separate downloads for Linux, OS X, and so on).

As it turns out, the JVM is useful for more than just Java. New languages that are able to compile down to code than runs on the JVM are able to stand on the shoulders of giants and leverage an incredible amount of infrastructure that has already been written and battle tested. Some of the more notable languages running in the JVM are Groovy, Scala (kind of a streamlined Java), Clojure (a “Lisp” dialect), and Jython (Python running inside of a JVM).

Getting back to Joe’s presentation, I think it’s fair to say that Joe is enamored with what’s called “syntactic sugar” in the programming world. This essentially means that a language provides features or inherent abilities that reduce the need for verbose boilerplate code. Groovy more or less delivers the goods in this regard. Furthermore, Joe has created some idiomatic Groovy enhancements specifically for the Essbase Java API that reduce the need to include some “clutter code”.

I definitely liked what I saw, although as an apparently diehard Essbase Java API guy I don’t think I’ll be switching anytime soon (you’ll convert me yet, Joe!). If you didn’t make the presentation then definitely give his slides a look. Joe is working through the red tape in his legal department to be able to post his code under an open source license. Joe, if you haven’t picked a license yet, give me a call and I’ll help point you in the right direction if I can.

In any case, nice job on the presentation, man.

In other news, I have been working a little bit on the side on a wrapper for the Essbase Java API that repents for some of its sins and modernizes the usage a bit more. This is tentatively called Java Essbase Antikythera Layer (JEAL). If you use the Essbase Java API at all you might really like how this simplifies your life. It’s unfortunately a labor of love that I can’t dedicate a lot of time to so if you want to help please drop me a line!

 

Hyperion Papercut: Cross-server cube copy in EAS doesn’t carry over data

So, this might not be a Hyperion papercut in the sense that I have been having some fun with. And it’s not something that I have even thought was an issue until it came up today. When you copy a cube onto the same server as the source cube, you get a full copy plus all the data. But when you copy the cube to a different server, you get everything excluding the data.

I’ve always assumed this was by design and have taken it as such. I mean, if the source cube is huge you could potentially do some bad things when you copy it to the target server. But wouldn’t it be nice if EAS just provided a checkbox to copy the cube with the data when you are going across servers? Obviously it knows how much space is available since the destination server can provide that information.

Of course, the process for getting over the data isn’t too onerous – you just export the data (raw) and load that up as-is to the target. All things considered, is this really a big deal? Of course not. But if you approach the construction of your software with a craftsmanship mentality, would the design be at least a little different? I think so.