Monday, June 1, 2015

Essbase Varying Attributes: Usable at last?

I don't know about everyone else, but I have several use cases that have always screamed out for varying attributes. I'm thinking reorgs here in particular. I've always pushed back against having two cubes: pre- and post-reorg hierarchies. Sometimes I win that battle. Most times not.

When varying attributes were added a few years ago, I literally did a little happy dance. It ended almost before it started, however, when I read that this functionality is not present in load rules, MaxL, or the Java API. 

In fact, you only have two options to maintain varying attributes. First, you can manually maintain them in EAS. This is not practical with a nontrivial number of members, whose attributes may also change. Second, you can use Essbase Studio. I don't know anyone else's experiences with Studio, but I'd probably retire if forced to use it on a regular basis. I'm only semi-joking.

So recently I started working on a program that enables maintenance of varying attributes from the command line. The VaryingAttributes.exe program is called thusly:

VaryingAttributes.exe "servername" "username" "password" "Application" "Database" "IndependentDimension1" "IndependentDimension2" "BaseDimension" "AttributeDimension" "ConfigFileWithAttributeMappings"

For example:
VaryingAttributes.exe "epm" "admin" "password" "Varying" "Attribs" "Market" "Year" "Product" "Pkg Type" "VaryingAttributes.conf"

Sample contents for the tab-delimited VaryingAttributes.conf file:

Base_Member Attribute_Member Range_IndDim1Member Range_IndDim2Member1 Range_IndDim2Member2
300-10 Can Massachusetts Jan Apr
300-10 Bottle Florida Jun Dec
300-30 Can Louisiana Mar Apr
300-30 Bottle Oregon May Oct

Here's how the program works:
1) all current varying attributes (Can, Bottle) for the Attribute Dimension (Pkg Type) are removed from the Base Dimension (Product)
2) the 2 Independent Dimensions (Market, Year) are reassociated to the Attribute Dimension (Pkg Type) for the Base Dimension (Product)
3) the varying attributes specified in the config file (VaryingAttributes.conf) are applied and the outline is saved
4) ????
5) Profit!

I still have some more polishing and testing to do, mostly around error handling. Despite the exe extension above, VaryingAttributes can also be compiled to run on Linux. I don't have a UNIX box to compile/test on, but it would also be trivial to port it to Solaris/AIX/HP if there is demand.

Would anyone find this program useful? And by "useful", I mean how much would you be willing to pay for it? And by "you", I mean your company that already paid millions for Essbase licenses and consulting. Please let me know in the comments.