Showing posts with label Smart View. Show all posts
Showing posts with label Smart View. Show all posts

Friday, December 13, 2013

Smart View Internals: Exploring the Plumbing of Smart View

Ever wonder how Smart View stores the information it needs inside an Excel file?  I thought I would take a look to see what I could learn.  First, I created this simple multi-grid retrieve in Smart View.



Note that the file was saved in the Excel 2007 and higher format (with an .xlsx file extension).  Did you know that the xlsx format is really just a specialized zip file?  Seriously.  It is a zip file containing various files that are primarily in xml format.  I saved the workbook, added the .zip extension to the filename, and opened it in WinRar.  Here is what I found.

I opened the xl folder to find a series of files and folders.


Next, I opened the worksheets folder to see what was in there.  Of course, it is a directory of xml files containing the contents of the worksheets.


My Essbase retrieves were on the sheet named Sheet1, so let’s take a look at what is in the sheet1.xml file.   The xml is quite large, so I can’t show all of it here, but needless to say, there is a bunch of information in the file.  The cell contents are only one of the things in the file.  Here is an excerpt that shows the contents of row 5 of the spreadsheet.



This is interesting as it shows the numbers but not the member name.  What is the deal with that?  I noticed there is an attribute, ‘t’, on that node.  I am guessing that the attribute t=”s” means the cell type is a string.  I had noticed that in one of the zip file screenshots, there was a file named sharedStrings.xml.  Hmm...  I took a look at that file and guess what I found?




That’s right!  The 5th item, assuming you start counting at zero like all good programmers do, is Profit.   That number corresponds perfectly with the value specified in the xml for cell B5, which was five (circled in blue in the xml file above).   OK, so when are we going to get to Smart View stuff?  The answer is pretty quick.  I continued looking at sheet1.xml and found these nodes near the bottom.

Hmm, custom properties that contain the name Hyperion?  Bingo!  There were a number of custom property files in the xml file.  Let’s focus on those.

Custom property #1 is identified by the name CellIDs.  The corresponding file, customProperty1.bin, contained only the empty xml node <root />.  Apparently there aren’t any CellIDs in this workbook.

Custom property #2 is identified by the name ConnName.  The file customProperty2.bin contains the string ‘Sample Basic’ which is the name of my connection.

Custom property #3 is named ConnPOV but it appears to contain the connection details in xml format.  Here is an excerpt of the xml.


Custom property #4 is named HyperionPOVXML and the corresponding file contains xml which lines up with the page fields I have in my worksheet.



What is interesting about the POV xml is that I have two different retrieves that both have working POV selectors which are both implemented as list-type data validations in Excel.  I don’t know what happens internally if I save different values for the POV.

Custom property #5 is labeled HyperionXML.  It appears to contain the information about the Essbase retrieval, but it doesn't appear to be the actual retrieval xml because it doesn't contain the numeric data.  My guess is that this xml is used to track what is on the worksheet from a Hyperion standpoint.



There is a lot of information in this simple xml stream, but the most interesting information is contained in the slice element.  Below is a close-up of contents in the slice.



The slice covers 6 rows and 7 columns for a total of 42 cells.  It is interesting that the Smart View team chose to serialize their XML in this manner for a couple of reasons.  First, the pipe delimited format means that every cell must be represented regardless of whether it has a value or not.  This really isn’t too much of a problem unless your spreadsheet range is pretty sparse.  The second thing about this format is that the xml itself is easy and fast to parse, but the resulting strings need to be parsed again to be usable.  For example, the vals node will get split into an array containing 42 elements.  The code must then loop the 42 elements and process them individually.  The other nodes, such as the status, contain other pieces of information about the grid.  The status codes appear to be cell attributes returned by Essbase; these attributes are used to apply formatting to cells in the same way the Excel add-in UseStyles would apply formatting.  There are a couple of things to take away:

  1. In addition to the data on the worksheet itself, there is potentially *a lot* of information stored under the covers in a Smart View file.
  2. String parsing is a computation-intensive operation and can hurt performance.  Multiply that workload by 8 because, depending on the operation and perhaps the provider, all 8 xml nodes above may need to be parsed.

In addition, the number of rows and columns shown in the slice may be important when you are looking at performance.  Smart View must look at the worksheet to determine the size of the range to read in order to send it to Essbase.  In the case of a non-multi-grid retrieve, the range may not be known and, as a result, the grid may be sized based on the UsedRange of the worksheet.  In our work with Dodeca, we have found that workbooks converted from the older xls format to the newer xlsx format, which support a larger number of cells, may have the UsedRange flagged internally to be 65,536 rows by 256 columns.  One culprit appears to be formatting applied to the sheet in a haphazard fashion.  In Dodeca, this resulted in a minor issue which resulted in a larger memory allocation on the server.   Based on the format of the Smart View xml, as compared to the more efficient design of the Dodeca xml format, if this were to happen in Smart View it may cause a larger issue due to the number of cells that would need to be parsed and processed.  Disclaimer: I did not attempt to replicate this issue in Smart View but rather is an educated guess based on my experience with spreadsheet behavior.

Note: The Dodeca xml format does not need to contain information for cells that are blank.  This format reduces the size and the processing cycles necessary to complete the task.  In addition, when we originally designed Dodeca, we tested a format similar to the one used today by Smart View and found it to be slower and less efficient.

Considering all of this information, I believe the xml format would be difficult for the Smart View team to change at this point as it would cause compatibility issues with previously created workbooks.  Further, this discussion should give some visibility to the fact that the Smart View team faces an on-going challenge to maintain compatibility between different versions of Smart View considering that different versions distributed on desktops and different versions of the internal formats that customers may have stored in their existing Excel files.  I don’t envy their job there.

After looking at all of this, I was curious to see what the xml string would look like on a large retrieve, so I opened up Smart View, connected to Sample Basic and drilled to the bottom of the 4 largest dimensions.  The resulting sheet contained nearly 159,000 rows of data.  Interestingly enough, when I looked at the contents of customProperty5.bin inside that xlsx file, the contents were compressed.  It occurred to be a bit strange to me as the xlsx file format is already compressed, but after thinking about it for a minute it makes sense as the old xls file format probably did not automatically compress content, so compression was there primarily to compress the content when saved in the xls file format.

Custom property #6 is labeled NameConnectionMap.  The corresponding property file contains xml that appears to map the range names in the workbook to the actual grid and the connection.


Custom property #7 is labeled POVPosition. The file customProperty7.bin contains the number 4 followed by a NUL character.  Frankly, I have no idea what position 4 means.

Moving on to custom property #8 which is labeled SheetHasParityContent.  This file contains the number 1 followed by a NUL character.  This is obviously a boolean flag that tells the Smart View code that new features, such as support for multiple grids, are present in this file.

Custom property #9 is labeled SheetOptions.  The corresponding file, customProperty9.bin, contains an xml stream that (obviously) contains the Hyperion options for the sheet.


Custom property #10 is labeled ShowPOV and appears to contain a simple Boolean flag much like that in custom property #8.

Finally, custom property #11 is labeled USER_FORMATTING and may not be related to Smart View.

I did look through some of the other files in the .zip and found a few other references to Smart View, but I did not see anything significant.

So, now that we have completed an overview of what is contained in one, very simple, multi-grid file, what have we learned?

  1. There is a bunch of stuff stored under the covers when you save a Smart View retrieve as an Excel file.
  2. With the reported performance issues in certain situations with Smart View, you should now have an idea of where to look to resolve Smart View issues in your environment.

There are a number of files I did not cover in this overview that could also cause performance issues.  For example, Oracle support handled one case where they found over 60,000 Excel styles in the file.  Smart View uses Excel Styles when it applies automatic formatting to member and data cells.  When there are that many styles in the workbook, however, it is logical that Excel would have a lot of overhead searching through its internal list of Style objects to find the right one.  Accordingly, there is a styles.xml file that contains custom styles.  If you have a bunch of Style objects, you could delete the internal styles.xml file.

Note: Be sure to make a copy of your original workbook before you mess with the internal structures.  There is a possibility that you may mess it up and lose everything you have in the workbook. Further, Oracle does not support people going under-the-covers and messing with the workbook, so don’t even bring it up to support if you mess something up.

Wow, that should give you some idea of what may be going on behind the scenes with Smart View.  Even with the experience I have designing and writing the Dodeca web services that talk to Essbase, I wouldn't say that I have a deep understanding of how the information in a Smart View workbook really works.  However, one thing is for certain;  Dodeca does not put stuff like this in your Excel files.  It may be interesting to hear what you find when you explore the internals of your workbooks.

Thursday, April 12, 2012

My Top 10 List of Reasons to Upgrade to the New Smart View 11.1.2.1.102


Recently, I did a presentation on the new Smart View 11.1.2.1.102 at the ODTUG Hyperion SIG event in Dallas.  In the presentation, I listed all of the technical innovations that brought this version of Smart View closer to the functionality of the classic Excel add-in for Essbase.  I also spent some time talking about the remaining differences between Smart View and the classic Excel add-in.  It was during this part of the presentation that I was asked a question I was completely unprepared for.  Someone asked me, “Why should we upgrade to Smart View over the classic add-in?”

At that moment, my mind went blank.  Maybe it was due to lack of sleep or maybe it was due to the fact that when I look at the new feature list, I feel the reasons to upgrade are pretty self-apparent.  Since that presentation however, I have stepped back and tried to look at it from more of a user's perspective.  In doing that, I came up with this list of reasons to upgrade.  Of course, some of the reasons are more compelling than others, so I decided to rank them based on what I would want as a user.

10. Smart View has integration with other Oracle products; the classic add-in does not.  Okay, if you exclusively use Essbase, this argument may not help convince you to move to the new Smart View.  If, however, you use any of the other products, this can help you get a better return on your investment in Oracle technology.

9. Smart View has integration with other Microsoft Office technologies; the classic add-in does not.  This can save you time if you have a recurring need to bring Essbase data into Microsoft Word or Microsoft Powerpoint.

8. Smart View allows you to setup favorite private connections that make it much easier, and faster, to connect to your favorite cubes.

7.

Smart View has new options for formula and format fill that leverages Excel formatting in ways not available in the classic Excel add-in. These options automatically apply Excel formatting from the Zoom-In operation source cells. Here is a simple example. In this grid, you can see that the cell containing the member name Cola has been formatted with a background color.

After a Zoom-In operation, the children of Colas also get the same formatting. This could be a very useful functionality for some users as they explore data in Essbase.

6. Smart View has a number of VBA functions which were not available in the classic Excel add-in. These VBA functions help customers who are would like to do lightweight automation tasks with Essbase. Of course, in the classic Excel add-in, you could revert to the Essbase API to do some of these tasks, but that added its own level of maintenance and deployment problems. Further, many customers have tried to use Excel as a development platform to build robust Essbase applications. Excel is a very good end user tool, but it is not a very good platform for building robust applications. Instead, if you need a robust Essbase development platform, save yourself a lot of time, effort, and pain and by checking out Dodeca. (Disclosure: I am the founder of, and lead the development team for, the company that publishes Dodeca.)

5. Multiple range operations are easy to use in Smart View; they are not easy to use in the classic Excel add-in.  This gives companies much more flexibility in designing their templates without the need for VBA coding.  The multiple range operation functionality embeds information about the different cubes within the workbook so that it can be refreshed without the need for the user to manually select a given range and connect to different cubes.  This makes these operations faster, more dependable, and much less susceptible to user error in Smart View than in the classic Excel add-in.

4. When you perform a cascade in Smart View, the Excel sheet tabs are appropriately named.  Cascade functionality is a very powerful feature of multidimensional databases, but it was severely limited by way it was implemented in the classic Excel add-in.  In the classic add-in, users had the choice of splitting the cascade into different worksheets or workbooks, but the worksheets, or workbooks, were named using a numbering system.  Users had to look at an optional tab of contents to determine which worksheet contained data for a specific member.  In the new version, the sheet names are based on the sheet member in the cascade.

3.

The ability to query more than 65,535 rows of data gives users the ability to see more data if necessary.  You may say to yourself, “Why would anybody need to see this much data?”  With today’s larger and larger datasets, it is easily possible for a ‘Next Level’ zoom to exceed the row limit enforced in the classic add-in.  Further, the classic add-in does not display the first 65,535 rows, but rather it puts up an error messages and prevents users from seeing those rows.  Here is a screenshot showing a large retrieve where I did a zoom-in to all levels of the largest 4 dimensions of Sample Basic.


Of course, if you try the same thing in the classic Excel add-in, you don't even get that far as you very quickly get an error message telling you that you have exceeded the maximum retrieval size.


2. Smart View users can have multiple instances of Excel open at once.  This may not seem like a big deal, but those of us who live and die in Excel feel very constrained if we have to be careful not to launch a second Excel instance.  What's the big deal, you ask?  The big deal is that the classic Excel add-in cannot do this.  Once you open a second instance of Excel, the add-in becomes very undependable as it can lose track of its connected worksheets.  I posted a 15 second video on my blog a couple of years ago that shows just how easy it is for multiple Excel instances to get mixed up.  Check out the video at http://timtows-hyperion-blog.blogspot.com/2009/09/fun-with-excel.html.

1. Smart View is the strategic direction for Oracle; the classic add-in will start to sunset in the next 4 to 5 years.   This isn’t something you can wait out hoping the issue will go away.  The classic add-in will be done.

When Oracle first started working on these improvements, they asked my opinion of their proposals.  I told them that, if they implemented the proposed changes, then Smart View would be good enough that people could use it to author Dodeca templates.  I am glad they have finally hit that milestone with the new Smart View 11.1.2.1.102.

Tuesday, March 6, 2012

Smart View 11.1.2.1.102 Performance Tip

A couple of weeks ago, I was preparing to speak on the new Smart View 11.1.2.1.102 at the ODTUG Hyperion SIG Dallas meeting and found a performance issue when trying to zoom in on large datasets.  Here is the sheet I was zooming:





I used Sample Basic and zoomed in to all levels on Year, Measures, and Product.  When I zoomed in on Market, Smart View never returned but rather just kept trying to zoom in for a while.  After working on it for a bit, I decided to try the same thing in the classic Excel add-in and, guess what?  The same sequence of operations is not even possible there as it easily shoots past the 65,535 rows supported by the classic add-in.   I tried it in Dodeca and it returned a bit over 172,000 rows in 5 seconds, so it certainly isn't an issue with the Essbase server and large retrieves.

I next talked to one of my friends inside Oracle and found the source of the performance issue.  If you have used the classic Excel add-in, you may remember seeing the Use Styles option which formats the cells returned by Essbase based on member cell or data cell attributes.  Based on my VBA experience, I can tell you that doing lots of format operations in an Excel worksheet can be quite slow.  In Smart View 11.1.2.1.102, there is a new option called Use Excel Formatting which also defaults to false.  This setting is conceptually the opposite of Use Styles in the classic add-in.  In other words, Smart View 11.1.2.1.102, along with all previous versions of Smart View, automatically formats the cells that are returned.  In fact, you can see the formatting in the screenshot above.

To prevent this automatic formatting and speed up your retrievals, set the Use Excel Formatting option to true.




Once I made this change, the zoom in operation on Market did complete and brought back more than 172,000 rows.

Another thing you may note from the spreadsheet is that member labels are repeated.  This is another difference between the classic add-in and Smart View.  The Repeat Member Labels option has been renamed Suppress Repeated Members and the default behavior has changed.  With Smart View, you must select the option to Suppress Repeated Members to see the same behavior you saw by default in the classic add-in.  Frankly, I don't remember if this is something new in Smart View 11.1.2.1.102, but just be aware of it.  In the screenshot below, I have set the Suppress Repeated Members setting to mimic the classic add-in.



Thursday, February 2, 2012

Smart View Dialog Positions

There was a question on the Network54 Essbase Board today about the member selection dialog in Smart View rendering off the screen.  It seems like I may have read something about this issue and a possible solution, so I decided to spend a few minutes investigating it..

The problem occurs when you have multiple monitors hooked up to your computer, open Smart View, connect to an Essbase database, open the Member Selection dialog and then move it onto your second monitor.  Smart View remembers where you moved the dialog and will display it there the next time you open the dialog.  The problem is, if you no longer have your second monitor attached, the dialog will display off-screen.

I took a look at the registry and found there is a DialogPositions setting in the registry under HKEY_CURRENT_USER\Software\Hyperion Solutions\HyperionSmartView\Options.





I found that you can close Excel/Smart View, delete the DialogPositions parameter from the registry, and restart Excel and the Member Select dialog will again be displayed centered on the main monitor.

You can make this easier for end users by creating a registration entries file.  On my machine, I created a text file and named it ResetSmartViewDialogs.reg.  In this file, I added the following lines:

REGEDIT4

[HKEY_CURRENT_USER\Software\Hyperion Solutions\HyperionSmartView\Options]

"DialogPositions"=-


To run the file, just double-click on it and you will be warned about the changes to be made to the registry. Simply confirm that you want the entries to be made and the offending DialogPositions setting will be removed.




Friday, November 4, 2011

NZOUG / ODTUG SP Sydney Wrapup

It is Friday afternoon and my busy week of speaking is over.   It started out in Auckland, New Zealand at the NZOUG conference.  It was a great conference and the special event, a dinner with an interactive mystery game, was excellent.  

Wednesday, we flew to Sydney for the ODTUG SP Conference.  The flight was on Qantas and, due to the airline shutdown earlier in the week, we had to check-in for the flight 2 hours ahead of time or risk losing our seats.  Qantas also enforces a weight limit of about 16 pounds per carry-on bag.  We didn't know that until we tried to go through security and we were sent back to check-in to check one of our carry-on bags.  Once airborne, however, the flight was great and I relaxed, watched the movie and enjoyed the meal service.  They even brought ice cream bars for dessert!  As we approached Sydney airport in the plane, we had a great view of the harbor, the Sydney Harbour Bridge, and the famous Sydney Opera House.

The SP Conference was well attended in both the BI and the EPM tracks.  I participated in the keynote where I got to tell everyone about the new version of Smart View.  I also had the honor of introducing the Oracle Fusion Accounting Hub.  This new product shows Oracle's deep commitment to Essbase and I will be doing a blog post with more details in the near future.   

My first session in Sydney covered Essbase techniques in Excel.  This session first discussed the new version of Smart View and I threw in some live demos.  The new Smart View brings near-parity to the classic Excel add-in and thus makes available a number of techniques that did not work with the older Smart View versions.  I also covered how Essbase 'Query-by-Example' grid layouts work and, based on the applause at the end, the session was very well received (or the attendees where very polite).

My final session was this afternoon and focused on Essbase API tips and tricks.  The SP conference is now complete and it is time to relax for a while.  I have been in Australia for 48 hours and haven't seen the famous Sydney Opera House yet.  It is only 2 or 3 blocks from our hotel, but I haven't really been outside at all.  We are headed out for dinner tonight and will be staying in Australia until next Wednesday, so I am sure I will see it soon.  

Tomorrow morning, we are doing the Sydney Harbour Bridge Climb with Mark Rittman and Stewart Bryson from Rittman Mead.  We will certainly see it then.


Speaking of Mark Rittman, he tweeted about the dangerous animals featured on the wall displays leading to customs in Sydney Airport.  At lunch yesterday, he pulled up a 'Top 10' list of Australia's most deadly animals.  I guess there are some nasty creatures here; the Great White Shark is only the 9th most deadly animal on the list!   I will be sure not to let down my guard.

Monday, September 26, 2011

Smart View 11.1.2.1.102 Webcast

As you may have heard on other blogs, the new version of Smart View has been released and it has some pretty cool features.  What that means is, after having been available since Essbase 7X, Smart View is finally good enough, in many cases, to be a replacement for the classic Excel add-in.

Some of the new features include:
  • POV Toggle
  • Formula Preservation
  • Formula Fill on Zoom Operations
  • Sheet level Options
  • Member Name and Alias on Rows
  • Resolve Alias Name
  • Zoom Options
  • Submit without Refresh
  • Duplicate Member Name
  • Member Information
  • Range-Based operations
  • Multi-cell based operations
  • Use Excel Formatting
  • Butterfly Report
  • Substitution Variable Support
  • Linked Reporting Objects
The Smart View team is hosting a webcast this coming Friday THURSDAY morning to show off their new product.  You can sign up for the webcast at on the Oracle support site under document id 1356368.1.   Note that you must have a (free) Oracle account to sign up for the webcast.  My team and I participated on the beta and, despite the fact that I will be at Oracle headquarters that day and the webcast is scheduled for 6 am Pacific time, I will be there.



A few people have asked me about Smart View vs Dodeca and asked if the products compete in the market.  To some degree, Dodeca does compete against Smart View, but it is more of a co-opetition.   We know the Smart View team and have worked closely with them for many years.  In fact, when I was briefed on the functionality, my comment was that Smart View would finally be a decent environment for creating Dodeca templates.  Congratulations to the Smart View team for finally reaching that milestone!

Speaking of Dodeca, we are on the verge of announcing a major new version.  Watch this space over the next few days as we start to show off our work!