Monday, November 23, 2015

cubeSavvy – security & grid storage

I’m introducing some major changes in this, the 3.0, version. Grids are no longer read directly from the Essbase application/database. This was too restrictive, both in terms of naming grids and grouping them by task, user, etc. Along the same lines, security is also needed to make sure only users who are authorized can access individual grids.
Adding a new grid or folder is as easy as clicking on an existing folder/grid. The applications and databases are read from the Essbase server, as are the calc scripts and Shared Services Groups.
add new grid in cubeSavvy 3.0
As hinted at by the above screenshot, security to a grid can be added based on Shared Services groups. Only those groups that have been provisioned to the selected Essbase application/database combination are displayed. The other way to control grid access is through user provisioning.
Admin users will see the User administration screen below on the Home tab. Only users who have Essbase server access will be displayed in the dropdown, which is searchable. Just type in the first few characters of the user who you’d like to add. There are only two User Types: admin and user. Only admins can edit grids and users. All of the columns are searchable and sortable.
user_screen_3_0Clicking the Edit User Access button for a selected user presents the following screen:
user grid access screen
The left panel displays the available grids to which the user doesn’t have access. The right panel shows the grids the selected user can access. Moving grids back and forth between the panels is as simple as clicking on them.
Ok, now that the administration details have been covered, let’s finally take a look at some grids. Six sample grids are included for instructional purposes. As can be seen clearly in the second screenshot above, you are no longer restricted by the 8-character limitation for non-Unicode Essbase report scripts. You can use up to 50 characters, with spaces, special characters, etc., in your names. Go wild!
The “calculated columns” sample grid is presented below:
calculated columns sample grid
I haven’t been doing a lot of Planning development lately, but I’m pretty sure it can’t produce this type of butterfly layout. Please let me know in the comments if I’m wrong. Don’t forget that cubeSavvy is using Essbase report scripts as the metadata/data presentation language. And report scripts can do some pretty cool things, like adding calculated columns, calculated rows, and rollups that are not in the underlying cube. First, let me show you the report script behind the above grid (by the way, it’s taken almost verbatim from the techref report script samples; I just added a Page dropdown):
calculated columns sample grid report script
The above report script demonstrates how to add 3 calculated columns (Actual~Qtr1, Budget~Q1, and Var~Q1). Why is this interesting? Because in the Year dimension of Demo/Basic there are no dynamically-calculated members. So Qtr1 is being updated solely through the report script (you can see that no calc script is attached to run on save – although this is still of course possible).
You can also use native report script functionality to create groupings that do not exist in the outline, as shown below in another sample grid:
create groupings not in outline
Not only are Northern Cities and Southern Cities grouped, but the totals for each are also displayed at the bottom. These are done on-the-fly when the Save Changes button is clicked. Again, this is taken from the techref samples, 15-B. To quote chapter and verse: “This sample report is a simple summary of information in a North/South grouping, which is not part of the database outline. When relationships that you need for reporting are missing in the database outline, often the best solution is to use calculated rows (or columns).”
You can download the latest version in the usual spot. Any feedback would be greatly appreciated.

Sunday, October 4, 2015

cubeSavvy - improved grid & tabs

I've just uploaded a new version of cubeSavvy. Improvements in the 2.2 version include:
  • Tabs. Now more than one grid can be open at the same time. This is a feature whose absence from Hyperion Planning has always baffled me. You can add graphs to a Planning form, but can't have two simple web forms open at the same time. The closest you can come is a composite form. In cubeSavvy you can open as many grids as you want. And speaking of grids...
  • Improved grid. The new grid allows dragging to copy the contents of cells, just as in Excel. Copying and pasting are also much easier and can be performed using the keyboard shortcuts you already know. The ability to undo changes (cmd-z or ctrl-z) has also been added.
  • Indentation in Page selection dropdowns. Now it's easier to determine the outline level of options in the selects. Those at level-0 have no indentation, whereas those at higher levels are indented according to their level.
  • Better handling of aliases. For example, the following commands are used before the Page layout is specified: 
    • <OUTALTSELECT "RussianNames"
    • { OUTALTNAMES } 
Please give the updated cubeSavvy a try and let me know what you think.
cubeSavvy_2_2

Monday, September 7, 2015

cubeSavvy - Essbase web grids

Many people have been interested in my Google Sheets add-on experiment. Invariably, however, they have commented that they just can't get their IT department to buy into the Google Sheets requirement to open their Provider Services URL to the web at large. Not one to beat my head against an immovable object needlessly, I've started working on the original cubeSavvy, which operates completely within the corporate firewall.

Intro to cubeSavvy 2.0


cubeSavvy was originally released a couple of years ago. I halted development on it soon after, however, because I wasn't happy with the state of web tables at the time. Besides Google Sheets there was nothing remotely usable for displaying Essbase data for editing. In the interim though, great strides have been made, so I'm going to give it another shot.

This updated version of cubeSavvy relies on a tried and true Essbase technology to specify how to render the web-based grid: report scripts.  Report scripts provide extensive features for selecting members, formatting data, etc. Since all Essbase professionals have experience with creating report scripts, using them seemed to be a logical choice. Grids are not currently stored in a separate database or file system. Rather grids created from the report scripts of the Essbase applications/cubes specified in the configuration file are presented.

Report Script

Here is a sample report script used to create a cubeSavvy grid:

//ESS_LOCALE English_UnitedStates.Latin1@Binary
//calc=subs
{ DECIMAL 2 }
{ COMMAS }
<PAGE ("Measures")
<IDESC "Profit"
<COLUMN ("Scenario", "Year")
"Actual" "Budget"
<CHILD "Qtr1"
<ROW("Product", "Market")
<IDESC "100"
<IDESC "200"
"Product"
<IDESC "South"
"Market"
!

Report script notes:
  1. The first thing to note is that this a a completely valid report script. You can run this directly from EAS, MaxL, or anywhere else you'd normally execute a report script.
  2. Let me draw your attention to the second line: //calc=subs. This connects the "subs" calc script to the cubeSavvy grid, meaning that it will be run when data on the grid is updated and saved. It has to be commented out in order for the report script to validate in EAS.
  3. All sections (Page, Column, and Row) are specified. This is a best practice anyway, but is required for the grid to render properly.
  4. All member names are surrounded by double quotes ("). This is also a best practice, since  member names with spaces require double quotes. cubeSavvy identifies member names in the report script as text within double quotes.

Calc Script

Below is the "subs" calc script specified to run in the above report script:

//ESS_LOCALE English_UnitedStates.Latin1@Binary
SET UPDATECALC OFF;
SET AGGMISSG ON;
SET EMPTYMEMBERSETS ON;

SET RUNTIMESUBVARS {
Measures = "Misc"; 
Year = "Qtr2";
Market = "South";
Product = "300","200";
Scenario = "Actual";
};

/*FIX on the Page member passed from grid*/
FIX(@LIST(&Measures))
  /*FIX on Column members from report script*/
  FIX(@LIST(&Scenario),@CHILD(&Year))
/*FIX on the first Row dimension */
  FIX(@ILDESCENDANTS(@LIST(&Product)),@ILANCESTORS(@LIST(&Product)));
  @ILDESCENDANTS(@LIST(&Market));
    @LANCESTORS(@LIST(&Market));
  ENDFIX
    /*FIX on the second Row dimension */
FIX(@ILDESCENDANTS(@LIST(&Market)),@LANCESTORS(@LIST(&Market)))
  @LDESCENDANTS(@LIST(&Product));
  @ILANCESTORS(@LIST(&Product));
ENDFIX
  ENDFIX
ENDFIX

Calc script notes:
  • First, and most obvious, is the use of RUNTIMESUBVARS. This feature was added as of 11.1.2.3, released in April of 2013. If you are using an older release, this functionality will not work. In this case, I really hope you are at least in the planning stages of an upgrade. You can still, however, attach a regular calc script (without RUNTIMESUBVARS) to the grid to be run on save. 
  • The variables within the SET RTSV are named exactly the same as the dimension names. This is a requirement. Any member selections for the dimension (<IDESC "100" and <IDESC "200" for Product, for example) will be passed to the RTSV variable of the same name ("100" and "200" for &Product). 
  • Notice the use of @LIST. This is necessary because more than one member can be specified in the report script member selection (see Product, as mentioned above). @CHILD(&Year) is used below without @LIST because <CHILD "Qtr1" is specified in the report script, so only one member, "Qtr1", is passed to this calc script. This is fine as long as it's known in advance that "Qtr2", for example, will never be added to the member selection.
  • Since @LIST is used, the normal @DESCENDANTS and @ANCESTORS will not work. Luckily, the "@L" variants (@LDESCENDANTS, @LANCESTORS) were created for just such a requirement.
  • Row, Column, AND Page members are passed to the calc script! You can do things like super-focused aggregation (as in the calc above) in Essbase that were previously only available in other tools. You're not limited to aggregations either. You can do anything with the members passed from the grid that you'd normally do in a calc script. Let your imagination run wild!

Installation and Running

Follow these steps to install and run cubeSavvy:
  1. Download cubeSavvy.jar.
  2. Just double-click on cubeSavvy.jar to launch the installer, which will prompt you for the install location and Essbase details.
  3. After installing, go to the directory you selected for the installation. You'll see a cubeSavvy folder with two files: start.sh and start.bat.
  4. For Windows, double-click on the start.bat file. For Mac/Linux/UNIX, run ./start.sh
  5. If you are running the install on a local machine, you can point your web browser to http://localhost:9001/cubeSavvy. If you installed on a server, you'll need to substitute "localhost" for the server's IP or DNS name.

Sunday, August 9, 2015

Google Sheets Add-on ZoomIn functionality

I told you I just can't stop adding functionality to my Google Sheets Essbase add-on. Now you can ZoomIn to a member's children both in rows and columns.

I've also added indentation to the member names to reflect their level. This is much the same as in the Excel add-in.

Next I may add the ability to ZoomOut to a member's parent.

Please let me know what you think in the comments.



Thursday, August 6, 2015

Google Sheets Essbase add-on

I just can't seem to abandon the idea of developing a Google Sheets Essbase add-on. Maybe I'm a little ahead of my time, or maybe I've got some of this guy in me. I don't know. What I do know is that every time I fire up my personal Essbase development environment, a Google Sheets script editor seems to also magically appear. If I build it, maybe they will come.

With Oracle moving more and more services to The Cloud, I have to think that companies' resistance to also moving at least some users to cloud-based office productivity tools like Google Sheets is destined to crumble. After all, the security model of Oracle Planning and Budgeting Cloud Services is exactly the same as Google Sheets. All your data is already in the cloud, so why not do your analysis there, too? And since a spreadsheet is really only useful if you can share it with others in your organization, which is where Google Sheets excels (sorry for the punny), why not eliminate the Excel middleman?

As the animation below demonstrates, the add-on currently has the ability to retrieve data from a range using the Essbase Query By Example (”QBE”) paradigm explained by Tim Tow in a blog post here. It actually even eliminates the need to prefix numeric member names with a single quote. This requirement can be extremely vexing to both users and admins alike. The add-on accomplishes all of this through the XMLA web service that you already have running through Provider Services. No additional software currently need be installed.

Of course, in order to also provide the ability to send updated data (a.k.a. lock & send; a.k.a. L&S) back to the Essbase server, it would be necessary to either install a Java API-based web application in-house or to enable the new Essbase Web Services that no one, outside of Oracle, appears to be using.

GoogleSheets_Essbase_addon

Before I expend any more effort on this add-on, am I tilting at windmills? Please let me know in the comments.
-Harry

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.

Monday, May 18, 2015

Pulling Essbase data into Google Sheets

I created a thread on network54 to gauge the interest in a Google Sheets Essbase add-in. I developed a sidebar that can run an MDX query against an Essbase database and return the data to a Google Sheet.

The following video demonstrates this functionality: google_sheets_POC
As I mentioned in the network54 thread, please keep in mind the inherent limitation of Google Sheets is that it can only connect to a publicly-available (i.e. internet) URL. As we all know, most companies keep Essbase walled off from the internet behind their firewall. A couple I've worked with have, however, opened up a secure port (https) to the Provider Server URL (e.g. https://CompanyAPS:13080/aps) for partner companies to access data. So it's not completely impossible that companies would be amenable to this option.

I can understand IT Security's reluctance to expose the APS https URL to an external web server, but risks can be mitigated. It is a secure (https) protocol and access is still controlled by Shared Services usernames and passwords passed from the Google Sheet.

If there is sufficient interest, the next step would be to add the functionality contained in the Essbase Excel add-in (and Smart View) to the Essbase Google Sheet add-on.

Please leave a comment if this is something you are interested in.

Thanks,
Harry Gates

Thursday, May 14, 2015

cubeSavvy Utilities 3.0 - XML Outline Editing

I was extremely excited to see XML Outline Editing show up in the 11.1.2.4 Essbase New Features. You see, I despise load rules. They are as close to evil as a software feature can get. Their hundreds of conflicting settings hidden away, just waiting to ruin your weekend. Not to mention their maddening propensity for corrupting at the least opportune moment. It's fair to say that anyone who's used them has been subjected to their fair share of pain.

The ability to export an outline to XML got us halfway there back in 11.1.2.0. Now that we can also make changes to outlines using XML, we can finally relegate these binary-only relics (a.k.a. load rules) to the dust-bin of Essbase history where they belong.

As with any Oracle product, however, there is a gotcha. In the case of XML Outline Editing there are two. The first is that this functionality is only available through the C and Java APIs. Oracle appears to be in the process of replacing EAS, having deprecated the EAS Java API. Hopefully the new tool will be better.

The second catch is one that appears to have fooled most people who have only read the Oracle announcement of this feature and not actually looked into its implementation: By XML Outline Editing Oracle doesn't mean that you can take the XML output from the MaxL "export outline" command, edit it, and load it back to the outline. The XML that allows you to make changes to the outline actually looks like this:

<mbrAdd mbrName="Yacht75" parent="Larry's Toys"></mbrAdd>
 <mbrUpdate thisMbr="Yacht75">
  <mbrInfo>
   <alias aliasTable="default" alias="PoochYacht"/>
   <alias aliasTable="LongName" alias="Fido's Oversized Pool Toy"/>
   <dataStorage>storeData</dataStorage>
   <consolidation>+</consolidation>
  </mbrInfo>
 </mbrUpdate>

As you can see, this XML looks nothing like the XML output from "export outline". The dream of being able to directly edit that XML, then load it back in is off the table for now. Oracle even made it hard to find documentation for the commands they have exposed. The Java doc has zero information. As is usually the necessary when this is the case, I had to turn to the C API. (This really makes me wonder if, in fact, the Java API has higher priority as Oracle usually claims.)

The EssBuildDimXML documentation does a good job of explaining the new XML tags/commands and even provides an example XML document. Be aware, however, that this example document doesn't work. It tries to make Ratios a sibling of Margin, rather than its parent, Profit. Since Profit is dynamic calc, code no worky. The frustrating part is that the function call asks you to include the name of a file to which errors will be logged. This also doesn't work. No matter what I tried, I couldn't get errors to log. Even worse, errors are never even thrown, so you have to actually check your outline to ensure your changes went through.

In order to make this new functionality more accessible to those who don't code using either the C or Java APIs, I've added the ability to call EssBuildDimXML from cubeSavvy Utilities. There's a new tab in the GUI and a new section in the conf file for running at the command line or in scripts.
Please download cubSavvy Utilities and let me know what you think.
-Harry Gates

Monday, April 20, 2015

cubeSavvy Utilities 2.0 - File Filters

Head on over to cubeSavvy to see the extremely helpful new feature I just added for filtering files using Essbase member selections.

Sunday, March 29, 2015

cubeSavvy Utilities – updated MDX capabilities

As promised when I introduced cubeSavvy Utilities, expanding the MDX Query functionality to handle PROPERTIES and PROPERTY_EXPR was my next task.
I’m happy to say that version 1.1, now available for download, incorporates this feature.
cubeSavvyUtilities_newMdx

This version can also handle an empty Columns axis:
cubeSavvyUtilites_mdx_onlyRows

Or an empty Rows axis:
cubeSavvyUtilities_mdx_onlyColumns

As you can see above, this gives you the ability to specify whatever you want in a Column or Row – and even by Dimension. Below is the MDX query from the empty Columns axis screenshot above. Note how I specify [Pkg Type] for the Product dimension property, but [ChineseNames] for Year.
SELECT {} on axis(0),
{crossjoin([100].children,{[Jan],[Feb],[Mar]})} PROPERTIES [Product].[Pkg Type], [Year].[ChineseNames] on axis(1)
FROM Sample_U.Basic
This flexibility gives you the power to control exactly what you want to see in the rows and columns. Therefore, I removed the 3 “Display Alias” checkboxes that were in the first version. Now you can let your MDX query do the talking. I love MDX and XMLA!
Happy querying!

Wednesday, March 25, 2015

Introducing cubeSavvy Utilities

cubeSavvy Utilities
I’ve wanted to combine my various Essbase-related tools into a single, integrated tool for a while. That tool is now called cubeSavvy Utilities. It encompasses my MDX Query Tool – XMLA Edition, ASO Export Parser, and MaxL Outline XML Parser.
cubeSavvyUtilities_home
I’ve also made some enhancements to the MDX Query tool’s functionality. The most obvious is the new ability to ‘Display Both Members and Aliases in Rows’, as seen below. However, it can also now handle queries that either have just COLUMNS or just ROWS. The next version will have expanded capability to display DIMENSION PROPERTIES and PROPERTY_EXPR. These are currently just ignored.
cubeSavvyUtilities_mdx
All 3 functions have been made scriptable, with the addition of a cubeSavvyUtilities.conf configuration file to specify the same parameters found in the GUI version. The configuration file also stores Essbase server information, like user name, password, server name, and APS url. I’m extremely security conscious, so the password is stored in encrypted format. Just enter it the first time and it’s encrypted for future uses. Running from the command-line/script is as easy as: java -jar cubeSavvyUtilities.jar out. The possible flags are ‘aso’ (for the ASO Export Parser), ‘out’ (for the XML Outline Parser), and ‘mdx’ (for the MDX Query Tool).
Following are the contents of a sample cubeSavvyUtilities.conf file:
#——————————————————————————-
#cubeSavvy Utilities, copyright 2015. Harry Gates
#Place quotation marks around entries:
# ASOExportParser.FileToParse=”C:\\Documents and Settings\\harry\\asosamp.txt”
# OR
# ASOExportParser.FileToParse=”C:/Documents and Settings/harry/asosamp.txt”
#To enter new Essbase.Password
#1) Enter new password value in line: Essbase.Password=”newPassword”
#2) Set: Essbase.PasswordEncrypted=false
#3) Essbase.PasswordEncryped will be set to true the first time the program is run as a script
#To specify filters:
# ASOExportParser.Filters=[“<DESC/Qtr1″,”<DESC/Senior”,”<CHILD/Digital Cameras”]
#To specify no filters, you can delete everything after the equals sign on the line: ASOExportParser.Filters=
#The MDX Query can span multiple lines by surrounding it with three quotation marks as follows:
# MDXQuery.MDXStatement=”””
# SELECT CrossJoin([Measures].CHILDREN, [Market].CHILDREN) on columns,
# Product].Members on rows
# from Sample.Basic
# “””
Essbase.APSUrl=”http://localhost:9100/aps/JAPI”
Essbase.ServerName=”epm”
Essbase.UserName=”admin”
Essbase.Password=”password”
Essbase.PasswordEncrypted=false
ASOExportParser.Application=”ASOsamp”
ASOExportParser.Database=”Sample”
ASOExportParser.FileToParse=”asosamp.txt”
ASOExportParser.OutputFile=”outputConf.txt”
ASOExportParser.Filters=[“<DESC/Qtr1″,”<DESC/Senior”,”<CHILD/Digital Cameras”,”<DESC/Sale”,”<CHILD/Price Paid”,”<DESC/Original Price”]
OutlineParser.FileToParse=”/Users/harry/test_124.xml”
OutlineParser.OutputFile=”/Users/harry/out124.txt”
OutlineParser.FieldDelimiter=”|”
MDXQuery.OutputFile=”/Users/harry/mdxResult.txt”
MDXQuery.DisplayAliasInRows=false
MDXQuery.DisplayMemberAndAliasInRows=true
MDXQuery.DisplayAliasInColumns=false
MDXQuery.MDXStatement=”””
SELECT CrossJoin([Measures].CHILDREN,[Market].CHILDREN) on columns,
[Product].Members on rows
from Sample.Basic
“””
#——————————————————————————-
 I originally developed each of these tools to scratch my own Essbase development and administration “itches”, where Oracle had yet to provide a solution. I hope you find them useful, too.
You can download cubeSavvy Utilities here.
Please let me know if you have any questions or ideas for improvement. I can be reached at harry.gates@cubesavvy.com