cameron's blog for essbase hackers_ fixing planning's filters
DESCRIPTION
blog workTRANSCRIPT
-
3/29/2014 Cameron's Blog For Essbase Hackers: Fixing Planning's Filters
http://camerons-blog-for-essbase-hackers.blogspot.in/2009/07/fixing-plannings-filters.html 1/9
Cameron's Blog For Essbase Hackers
I will be available on 15 April, 2014. Essbase forever! Or something like that. Contact me on LinkedIn if you're interested.
21 JULY 2009
Fixing Planning's Filters
Full disclosure and source code and of course a
disclaimerMuch of the content of this post comes from a ODTUG Kaleidoscope presentation I gave in June of this
year. The presentation (280 Master Essbase with MaxL automation) should be available 90 days after
the conference, so I am guessing some time in September. I will update this post when it is available for
those who want to see more.
This code was sort of the capstone of the presentation and used a variety of MaxL techniques. If you
look at the source code youre probably going to wonder why I used so many different approaches to,
oh say, error checking, for example you will intuit that I was trying to illustrate the different ways it can
be handled. For your sanity I suggest you pick one (like %ERRORLEVEL%) and stick with it.
The source code is available here.
Take a look at the code, laugh at it, admire its genius, use it in anger whatever. If it causes the end of
the world (your Hyperion world, at least), gets you fired because it didnt work, or any other less than
optimal outcome, well, I make no guarantee, warranty, or anything else. Use it at your own risk. It is
worth every penny you spent, which would be exactly zero.
Plannings Filter OddityI seem to be going on and on about Planning, not Essbase, and of course the name of this blog isnt
Camerons Blog For Planning Hackers, so its fair to ask whats going on.
Well, Planning is a wrapper application around Essbase at the end of the day, whether its
dimensions, data, or Business Rules (aka calc scripts on steroids) Essbase is the foundation that
Planning rests on. And Planning drives Essbase, but oddly.
Within Hyperion Planning, metadata is filtered. That is, if you're a Planning user, and security is applied
to a dimension, you can only see the bits of the dimension that you have read or write access to. (If
your read access is greater than your write access, you will see more members in, say, a dimension
drop down, but you will only be able to write to the members you have write access to.)
This makes sense, right? Why would you want to deal with members you can't touch?
Makes sense Here's the administrator's view of the Entity dimension from the Planning reference application:
Developing Essbase
Applications
Cameron Lackpour
Best Price $58.96
or Buy New $62.96
Privacy Information
DEVELOPING ESSBASE BOOK
Learn Basic Linux Command
with Cheat Sheet
pic.twitter.com/vmGtS38RNK
Retweeted by Cameron
Lackpour
Osama Mustafa
@OsamaOracle
27 Mar
Tweets Follow
Tweet to @CameronLackpour
TWEET
Search
SEARCH THIS BLOG
MY BLOG LIST
fishing with FDMEEFDMEE PSU510 released(11.1.2.3.510)1 day ago
Cube CoderReverse-Engineering BlockDensity Statistics2 days ago
DEV EPMDEVEPM at ODTUG ExpertPanel ODI3 days ago
Glenn Schwartzberg'sEssbase BlogAnother post on 11.1.2.3.500
More Next Blog Create Blog Sign In
-
3/29/2014 Cameron's Blog For Essbase Hackers: Fixing Planning's Filters
http://camerons-blog-for-essbase-hackers.blogspot.in/2009/07/fixing-plannings-filters.html 2/9
The Planning administrator sees all this is appropriate, as he is responsible for all data.
And here is a Planner's view of the world (literally):
See the difference? For a user that can only see Latin America, all is as it should be.
Stop making senseAnd heres that same user looking at the same dimension in SmartView:
The rows highlighted in yellow are not readable/writeable, but are visible. While the planner can select
these members, he cant retrieve their data values. This is inconsistent, and is colloquially known as
Not Good.
Why does it do what it does?Planning performs metadata filtering within the application, but when it writes the filters to the Essbase
id used to query data, it uses a READ, not a METAREAD filter.
Why? This is a mystery. Okay, lots of things in life are mysteries, but the fix from the Planning side
seems so simple (use METAREAD, not READ). Im a fan of Raymond Chandler, but I am not seeing
the plot to The Big Sleep here. Well, maybe someone was snoozing when this was implemented.
The fix (no, not the FIX..ENDFIX, the solution)A few years ago at Solutions in the product lab I asked a Planning product manager (I think) about using
MEATREAD and he said "It can't be done."
Curiouser and curiouser. Why not? Was there something in a METAREAD filter that would cause the
world to stop spinning, the magnetic fields to fade, and result in a cockroach-only world? This did seem
somewhat far-fetched.
There had to be a reason; I suspected I wasnt hearing it. This was (and is) sort of the equivalent of
waving a red cape in front of a bull and it made me curious -- why not? Essbase has had METAREAD
since 6 (I think, it could be earlier). Why not write a METAREAD to Essbase when refreshing security?
There was an easy way to test this roll my own refresh and force METAREAD filters as part of the
Planning refresh.
Dare I? Briefly, I considered Robert Oppenheimers quote of the Bhagavad-Gita at Trinity: I am become
Death, the Shatterer of Worlds, but in the true spirit of all mad scientists, I quickly dismissed such idle
4 days ago
Tim Tow's Hyperion BlogWhat's New in Dodeca 6.7.1?4 days ago
Gurcan Orhan's OracleData Integrator BlogSave the date for 29th April1 week ago
Hyperion @ 42 BelowPlaying with DOS (writing aDOS batch job to controlthread management)1 week ago
jason's hyperion blogA quick trick to avoid hard-coding folder names in batchfiles2 months ago
Look Smarter Than YouAreMy Friend, Mike Riley, HasCancer3 months ago
Essbase LabsUsing Smart View to CombineOBIEE and Essbase Data6 months ago
The Traveling ConsultantOther Profiles: The Contractor Part I6 months ago
hyp3d on hyp3rionThe KScope 13 Aftermath9 months ago
MetaveroFirst Look 11.1.2.31 year ago
SUBSCRIBE TO ESSBASE HACKERS
Posts
Comments
Why I hate (andlove) CalculationManager, part 1
Hate takes too muchenergy And besides,
its difficult to hate a softwareproduct, unless its name is HAL . :) Love? When it com...
The fastest way to export targeteddata from BSO Essbase withNONEMPTYBLOCK
NB The best way to experiencethis blog is with one of thefollowing musical soundtracksopen and playing in a loop onanother tab or wi...
Yeah, yeah 11.1.2.1 is here, sowhat?
Introduction Given the excitementaround this release (geeks getenthused by some pretty oddthings), youd think an Oracle-red
POPULAR POSTS
-
3/29/2014 Cameron's Blog For Essbase Hackers: Fixing Planning's Filters
http://camerons-blog-for-essbase-hackers.blogspot.in/2009/07/fixing-plannings-filters.html 3/9
thoughts. Our future as cockroaches would bring many benefits, anyway.
Diagnosing the diseaseWhat's the problem?
The filter in EAS as written by Planning:
Easy fix in EAS
If only it were this easy -- just copy the READ row and make it a METAREAD. Since METAREAD is
more restrictive (both data AND metadata) it takes precedence, so the READ line doesn't have to be
deleted:
And it looks just right in SmartView (or the Essbase-centric reporting tool of choice).
One tiny problemBut when Planning does a security refresh, it's going to go right back to the bad old ways of yore, and
will strip the METAREAD off the Planner's filter. Bummer.
And if you have 200 users, manually editing their filters in EAS is going to cause your fingers to fall off,
or your eyeballs pop out of your head, or something else equally horrible. I understand that cockroaches
can regenerate limbs, so theres another plus towards the possible end of the world due to
METAREAD.
Back to some kind of solutionBy hacking (okay, I am stretching this, but hey, it's the name of the blog, so bear with me) Essbase, we
can make the user experience the same between Essbase and Planning without . Never say "It can't be
done" to a moderately curious geek.
What would this refresh need to do?
1) Refresh Planning dimensions and security
2) Apply METAREAD access to those filters
Pretty simple, right? It's always easy when the consultant writes it on the whiteboard...
A little more detailWe're going to combine Planning 11x's CubeRefresh.cmd, MaxL, NT Cmd scripts (I am showing my
age), and VBScript (ditto) to put together a scripted approach to Planning that:
1. Refreshes Planning through CubeRefresh.cmd
2. Writes the filters to disk via MaxL
3. Reads them into memory in VBScript
4. Programmatically generates MaxL code to apply a METAREAD to each of those filters
5. Run that new MaxL script
lightning bo...
Why I hate (andlove) BusinessRules, part 2
The Two Minutes'Hate is over the
below is a paean of love to HBR.Prequel to the cool stuff So in part1, I reviewed how to create ...
Stupid Programming Tricks #6
Introduction Number S ix in myStupid Tricks collection. Should Ibe worried that so much of what Iknow falls into this category? Ill...
A lightweight, modular, and betterEssbase backup
Your nightly backup Backupscome in many flavors: email,important documents, code, familypictures, SQL databases, and ofcourse Essbase d...
Fixing Planning'sFilters
Full disclosure andsource code and ofcourse a disclaimer
Much of the content of this postcomes from a ODTUGKaleidoscope presentation I ...
Why I hate (andlove) BusinessRules, part 1
Just a quick note --this is a two part
(hence the title) post as thecontent was just too long. Trustme, the next post is worth waitinga...
A simple 23 step guide to Books,Batches, and Bursting in HyperionFinancial Reports
Introduction to the guide I wasasked in in this thread over on theNetwork54 Essbase board to posta guide to Hyperion FinancialRepor...
Installing 11.1.2.3 Can anEssbase and Planning consultantpossibly do it?
Introduction Why, yes, he can,much to his (and maybe everyoneelses) amazement. Those of youwho have followed this blog (ah,Mum, yo...
2014 (9)
2013 (48)
2012 (50)
2011 (38)
2010 (22)
2009 (9)
December (1)
November (1)
BLOG ARCHIVE
-
3/29/2014 Cameron's Blog For Essbase Hackers: Fixing Planning's Filters
http://camerons-blog-for-essbase-hackers.blogspot.in/2009/07/fixing-plannings-filters.html 4/9
BTW, I happen to be mildly proficient in VBScript (call me Fred) and NT Cmd scripts. You could use
whatever tools you like, e.g., Powershell, or the Bourne shell, or Rexx (call yourself T. Rex), etc.
Putting it all together
This is where youre going to want to download the source code and follow along. At least thats what I
would do, but I have been called odd (and a few other choice descriptions, but I digress).
Script components
Script name Description
Refresh_Planning.cmd Overall NT Cmd control
script
ModCubeRefresh.cmd Refresh Planning utility
Create_MetaRead_Filters.wsf VBScript to read output from
Write_Filters_To_Disc.mshs
and write METAREAD filters
call_metaread_add_filters.mshs MaxL shell to run
METAREAD filter adds
Metaread_Add_Filters.msh Programmatically generated
METAREAD filters
A note about ModCubeRefresh.cmd
When I ran CubeRefresh from a command line (this was within the C:\Hyperion\products\Planning\bin
directory) it worked just fine. However, when I called it from another batch file it stopped all execution. I
tried every trick I could think of to make it work and finally just added an EXIT to the end of it and saved
it as ModCubeRefresh.cmd.
Refresh_Planning.cmd
To get this all to work, I used the calling script to accept parameters as shown below:
Parameter Value
Planning
encrypted
password
file
c:\tempdir\odtug_2009\password.txt
Planning
application
plansamp
Planning
admin
username
admin
Refresh or
create
/R
Filter
switches
/FS
Essbase
server
%computername%
First half of
private key
316108469
Second
half of
private key
694177571
How do I run it?
refresh_planning.cmd c:\tempdir\odtug_2009\password.txt plansamp admin /R /FS %computername%
316108469,694177571
ModCubeRefresh.cmd
The normal CubeRefresh.cmd script has seven parameters:
Parameter Value
October (1)
September (1)
August (1)
July (1)
Fixing Planning's Filters
June (2)
May (1)
11.1.2 (6) 11.1.2.1 (11) 11.1.2.2
(5)
Amazon EC2 (10)
ASO (14) awesome (32)
BSO
(15) BusinessIntelligence (5)
calc scripts (7) Calculation
Manager (9)
Developing
Esssbase Applications (11)
dimensions (8)
Dodeca (14)
EPM (16)
Essbase (66)
Excel (8)
FDM (7)
Financial Reports (8)
hack (11)
HFM (8)
Infrastructure (9)
installation (6)
Kaleidoscope (10)
KScope11 (9)
KScope12 (14) Kscope13 (14)
Long Beach (6)
MaxL (13)
MDX (5)
ODI (13)
ODTUG (44)
Oracle (19) OracleEPM (14)
Planning (50)
queries (5)
LABELS
11.1.2.3 (4) 64 bit (4) Ace (2) Ace
Director (2) Advisors (4) alphabet (1)
And now for
something completely different (1) Arbor (1)
Australia (1) automation (1)
backup (1) batches (1)
benchmark (1) BI (2) BI Apps (1) board of
directors (4) book (3) books (1)
bug (1) bursting (1)
Business Rules (2)
campaign (1) Classic
add-in (2) CLEARDATA (1) Cloud (4)
code (2) combobox (1) Community Service
Day (1) conferences (1) Consulting (3)
Crystal Ball (1) Data Detective (1) Data
integration (1) data quality (1)
DATAEXPORT (3)
DIM (1)
dir (1) documentation
(3) DOS (2) Drill through
(1) Early Bird (1) election (3) Endeca (1)
Ephemeral (2) EPMA (3)
escape (1)
Essbase MaxL scripting quotes parameters
variables SQL (1) Essbase Planning (3)
Essbsae (2) Exalytics (2)
Excel add-in (2) export (1)
filters (3)
focused aggregation (3) free (2)
Full360 (2) funny (1) Fusion (1) futures (1)
GLOC (1) hackers (2) hacks
(1) HAL (1) half price (1)
hierarchy (3) Hybrid (1) Hyperion (4)
Hyperion SIG (3)
inheritance (4)
Kaleodoscope (1)
Kindle (1) kitchen sink (1)
Kscope14 (3) Labs (1) LCM (1) listbox (1)
Load Rules (1) Lunch
n' Learn (1) macros (1)
MaxUserPort (1) meetup (3)
memory (1) METAREAD (1) New Orleans
(2) New Zealand (2) nostalgia (1)
NZOUG (3) OBIEE (4)
ODTUG SP
Australia (2) OLAP (1) OPatch (2)
OpenWorld (4)
Oracle Open World (4)
OTN (2) painful (1) panel (3) patch (1)
Planining (1)
podcasts. Oracle (1) poll (1) programming
(1) provisioning (1) query
-
3/29/2014 Cameron's Blog For Essbase Hackers: Fixing Planning's Filters
http://camerons-blog-for-essbase-hackers.blogspot.in/2009/07/fixing-plannings-filters.html 5/9
-f Path to encrypted
password file
/A Planning application
name
/U Username
/C RMI port to bind to
(Extra points if you
tell me who said
This is the sort of
English up with
which I will not put.
And why. And if he
really did. Hint -- His
name isnt Gordon
Broon.)
/R Create or refresh
outline
/D Process database
/F or /FS or /FV or
/FSV or /FVS
Filters, shared or
not, or even
validated
/L Connect to the local
bean (Is this like,
"Splendid work, old
bean."? Again, I
digress.)
/RMIPORT RMI port to bind to
the remote Planning
bean. Use with /-L
option
/DEBUG Print debug
statements
The RMIPORT, Create/Refresh, Process database, Use security filters, Connect to the local bean, and
Debug parameters are optional.
In my world (this is my code, you can follow or get just as explicit as you like/need/want), I chose to
explicitly define: the password file, application name, username, refresh or create, filter switch (what
would be the point otherwise?), and I also passed along a log file I use for error checking.
Write_Filters_To_Disc.mshs
This is simple code that writes all Essbase filters to disc. I dont know why I did this, as the display filter
command can be limited to only one database. It works in the demo world, but in a real environment its
a distinctly lousy idea. Feel free to modify this with a MaxL parameter variable to pass only the Essbase
database filters you want. Yes, this gets trickier with multiple Plan Types.
Create_Metaread_Filters.wsf
This is where the rubber meets the road it reads the output from Write_Filters_To_Disc.mshs,
converts the READ filter to METAREAD, and generates the MaxL script Metaread_Add_Filters.msh.
This file will be used to set the Planners filters to METAREAD.
Call_metaread_add_filters.mshs
Encrypted (username and password) MaxL shell to modify filters to use METAREAD.
Metaread_Add_Filters.msh
This is the code that adds the METAREAD. Its kind of silly to have both a READ and METAREAD in the
same filter, although it works because of METAREADs more restrictive nature. I tried using MaxLs
replace filter command instead of alter filter but I found that it just gave the Planner read access to the
entire dimension in question. It must be (I think) something to do with Shared Services and alter filter
works, so I went with that. I welcome a better approach hint Blogspot has a comment section and I
read them. I will modify this post as required.
San Antonio (6)
security
groups (7)
sessions (5) Shared
Services (7) Smart View (8) SQL
(23)
stupid
(10) stupid Planning queries
(17) stupid programming tricks(13) stupid trick (12)
Support (10)
symposium (5)
tricks (6)
(4) quotes (1) refresh (1) Regedit (1)
regional (1) Registry (1) report scripts (2)
reporting (4) scripting
(1) Search (1) secret stuff (1)
selectors (1) Seriously
Practica (1) Seriously Practical (1) service
startup (1)
SQL Passthrough DataSet (1) SQL
Server 2008 (4) Stanley (1) statistics (1)
Strategic Finance (1) Studio (3)
styles (1)
substitution variable (2)
survey (2)
TcpTimedWaitDelay (1) templates (1) text (1)
TINCR (1) treeview (1) trick (4)
undocumented (2) user conferences (1)
user groups (1) User Variables (2)
variables (1) VBA (1) virtual (1) VM Ware
(3) VMWare (2) Volunteers (2)
Washington DC (1) w ebcast (1) webinar
(4) w hat a deal (1) Windows (3)
Windows 2008 (4) Workbook Scripts (1)
Workspace (4) xml (2)
Join this sitew ith Google Friend Connect
Members (96) More
Already a member? Sign in
FOLLOWERS
Cameron Lackpour
View my complete profile
ABOUT ME
Essbase on OTN
AKA Essbase.org
MY FAVORITE ESSBASE LINKS
-
3/29/2014 Cameron's Blog For Essbase Hackers: Fixing Planning's Filters
http://camerons-blog-for-essbase-hackers.blogspot.in/2009/07/fixing-plannings-filters.html 6/9
Posted by Cameron Lackpour at 10:05 AM
Labels: automation, Essbase, filters, MaxL, Planning
What does it look like?
Magic Essbase filters that come from Planning are now METAREAD filters.
ConculsionI believe that the Earth still rotates on its axis. All is well. I do not scuttle sideways across the floor, and
my trusty prismatic compass still works, so apparently TEOTWAWKI did not occur.
NB You will have to perform all filter refreshes through this utility. Unfortunately, for
ModCubeRefresh.cmd to work, this will require Planning server access, or at least remote access.
There are a number of ways to do this Google is your friend.
The futureAt the conclusion of the presentation, I heard that METAREAD functionality is now in the pipeline for
Planning.
However, if youre on Planning 9x (the Planning refresh utility is a little different), or up to 11.1.2, you
may want to use this code base to give your Planning users the same metadata filtering in Essbase as
they get in Planning.
Another chapter in hacking Essbase under the belt.
15 comments:
Anonymous said...
Cameron,
Very nice blogs! thank you! However, I tried to dl your source code but I can't extract your zip
file.
21 July, 2009 13:53
Cameron Lackpour said...
Anon,
You're very welcome. Thank you for your kind comment.
Re the download -- I was able to go the link and download the zip file to my desktop and extract
it.
Could it be that your workplace blocks zip files?
I am a paying FileDropper customer so that file will remain (as long as I pay my $0.99/month).
Regards,
-
3/29/2014 Cameron's Blog For Essbase Hackers: Fixing Planning's Filters
http://camerons-blog-for-essbase-hackers.blogspot.in/2009/07/fixing-plannings-filters.html 7/9
Caneron Lackpour
22 July, 2009 06:58
Elevation58 said...
Hi Cameron,
Very interesting approach, thanks for sharing this. Is the source code still available? There's
nothing on FileDropper?
Thanks
Mark
16 August, 2009 16:33
Cameron Lackpour said...
Mark,
Thanks for pointing the bad link out.
Try it now -- it should be fixed.
Regards,
Cameron Lackpour
23 August, 2009 08:03
Elevation58 said...
Hi Cameron,
Thanks for the update.
Mark
23 August, 2009 12:15
Anonymous said...
Hi,
I too am not able to unzip the file Automating_Essbase_with_MaxL_code.zip which I
downloaded from FileDropper. I even tried using WinRAR to unzip it, but it did not work. My
windows XP 2002 is able to see the files in your zip file, but not able to extract them.
13 January, 2010 13:19
Anonymous said...
Looks like the download works. I can then look at the files inside. but when you try to unzip it.
The program fails for all files.
04 March, 2010 09:26
Alp Burak Beder said...
Hi Cameron,
Thanks a lot for the post. Is it possible to re-upload the file? I tried many ways but I couldn't
extract the zip file. I think I am not the only one facing the same issue.
Cheers,
Alp
12 April, 2010 22:48
-
3/29/2014 Cameron's Blog For Essbase Hackers: Fixing Planning's Filters
http://camerons-blog-for-essbase-hackers.blogspot.in/2009/07/fixing-plannings-filters.html 8/9
Cameron Lackpour said...
Sorry for the tardiness -- I have to figure out how to get emails when comments get posted. I've
been monitoring my more recent posts, not these older ones.
Anyway, I rezipped the files, uploaded them, changed the HTML to point to the new file name
(FileDropper assigns it, not me), saved the post, opened it, downloaded the files to my hard
drive, unzipped the files, and edited one or two of those files.
Whew, what I do for you. :)
It should be good to go.
Ping me on LinkedIn in future if something I'm providing goes tits up and I'll do my best.
Thanks for reading.
Cameron Lackpour
15 April, 2010 08:28
Anonymous said...
Cameron, I still can't extract the zip files to edit them. Any chance you can take a look at this
again?
18 December, 2010 15:21
Jeff said...
Wow, really well done, the scripts are well documented with comments, easy to follow, very
complete.
Thanks for this!
24 May, 2011 16:05
Adella said...
Hi Cameron,
I am not sure if you will check this comment or not as you might not be keeping a track of your
older posts but still I wanted to post my comment.
Very very nice post! It is really very informative. Infact, I learned as well as enjoyed reading it.
Not all can write like this I guess. I hope to read more and more of such posts from you.
Please do continue sharing your immense knowledge. It would really help us a lot !
Thank you so much.
~ Adella
15 September, 2011 16:37
Joachim1111 said...
Great blogs Cameron. Bought your DEA book too. :) Regarding:
"At the conclusion of the presentation, I heard that METAREAD functionality is now in the
pipeline for Planning.", do you have an update on the timing of this? If we can hack it, it
shouldn't be so difficult to add, should it?
25 September, 2012 10:01
Cameron Lackpour said...
Joachim,
I asked this question at Kscope12's EPM symposium -- it is STILL not fixed.
-
3/29/2014 Cameron's Blog For Essbase Hackers: Fixing Planning's Filters
http://camerons-blog-for-essbase-hackers.blogspot.in/2009/07/fixing-plannings-filters.html 9/9
Newer Post Older PostHome
Subscribe to: Post Comments (Atom)
Post a Comment
Create a Link
Sorry,but now you have a chance to write a script. :)
Regards,
Cameron Lackpour
23 October, 2012 14:48
Anonymous said...
Hi Cameron,
Any chance of getting a link for the source files? If there's a download on here somewhere, I
cannot for the life of me find it.
Thanks!
Bill
11 April, 2013 17:51
Links to this post
Picture Window template. Powered by Blogger.