The Cameroon Airlines Corporation, trading as Camair-Co, is an airline from Cameroon, serving as flag carrier of the country, a role which was previously filled ...
Monday, October 31, 2011
What The Swiss Can Teach Metro-North
Sunday, October 30, 2011
Stupid Planning queries #7 -- User Variables
Introduction
You use User Variables, right? That’s the functionality typically (only?) used in Planning forms to allow the user to select the member he wants to drive the form. I use these when dimensional security doesn’t work or when the form gets too large.
Set and forget
It’s easy to set them by going to File->Preferences->Planning->User Variable Options as shown below.
How do you use them in forms?
They look just like Essbase Substitution Variables, right down to the “&” in front of the User Variable name.
NB – I like to stick a “uv” in front of the name to differentiate them from Substitution Variables, so instead of &CompareScenario it would be &uvCompareScenario. This isn’t a big deal when you’re building the form, but aids in identifying what’s what later on. Or when you bounce from client to client, and app to app, and barely know what state you’re in. The glamor of consulting. :)
In any case, as this is the Planning Sample Application, I’m not changing it. But you did get a Cameron Good Practice suggestion there for free.
So how do I know who has what?
There’s really no good way to know in Planning what’s been defined by user except by asking said user. As that could be a trifle exhausting (and inaccurate) in anything other than a teensy-weensy application, SQL comes to the rescue again.
Standard disclaimer
As always with these queries, they are 100% unsupported by Oracle and there’s a tremendous chance that I’ve gotten them wrong, so test, test, test and remember that you are hacking the tables and if anything blows up you are completely on your own. Got it? Good, let’s begin.
User variables query
--User variables
-- Purpose: Get the User Variables in a Planning application
-- Modified: 30 October 2011, first write
-- Notes: This is a simple one, isn't it?
SELECT
O.OBJECT_NAME AS 'User',
U.VARIABLE_NAME AS 'Variable',
O2.OBJECT_NAME AS 'Member',
-- Use SQL Subquery to get aliases.
-- NB -- The overall SELECT from HSP_MEMBER ensures that members with
-- and without an alias are selected.
-- ISNULL puts in zero length string in place of NULL
ISNULL((SELECT OA.OBJECT_NAME
FROM HSP_ALIAS A
INNER JOIN HSP_OBJECT OA
ON A.MEMBER_ID = O2.OBJECT_ID AND
OA.OBJECT_ID = A.ALIAS_ID), '') AS 'Alias'
FROM HSP_USER_VARIABLE_VALUE V
LEFT OUTER JOIN HSP_OBJECT O
ON V.USER_ID = O.OBJECT_ID
LEFT OUTER JOIN HSP_OBJECT O2
ON V.MEMBER_ID = O2.OBJECT_ID
LEFT OUTER JOIN HSP_USER_VARIABLE U
ON V.VARIABLE_ID = U.VARIABLE_ID
ORDER BY 1, 2
And the output
User | Variable | Member | Alias |
Biff | Allocation Expense | 330000 | Minority Interest Income |
Biff | Allocation Quarter | Q1 | |
Biff | CompareScenario | Forecast | |
Biff | CompareVersion | Working | |
Biff | Current Version | Working | |
Biff | CurrentScenario | Forecast | |
Biff | My Region | E01_0 | North America Corporate |
Biff | My Segment | BAS | Bookshelf Audio System |
Biff | Revenue Measure | 411100 | Operating Revenue |
hypadmin | Allocation Expense | 312100 | Interest Income |
hypadmin | Allocation Quarter | Q4 | |
hypadmin | CompareScenario | Plan | |
hypadmin | CompareVersion | Final | |
hypadmin | Current Version | Working | |
hypadmin | CurrentScenario | Forecast | |
hypadmin | My Region | E01_101_1110 | MA |
hypadmin | My Segment | Seg01 | Electronics |
hypadmin | Revenue Measure | 400000 | Gross Profit |
Conclusion
Yet Another Planning Query (YAPQ), pronounced Yap Que, hits the dust. I know there are other people there doing these. I wonder why I never hear from them. Am I doing something akin to an arch-villain exposing the inner works of the Guild of Calamitous Intent? This stuff is so easy, even a Planning consultant can do it? No matter, I forge onwards.
Monday, October 24, 2011
AWS tricks #1 -- How to get rid of terminated volumes
Introduction
I spent this weekend figuring out how to install ODI 11.1.1.5 using SQL Server 2008 not Oracle 11g as the database back end and I now know two things:
- I really ought to be doing this on Oracle instead of SQL Server as all of the blogs seem to cover the settings for Oracle. I find it interesting that the 10.1.3.x blog posts seemed to be oriented around SQL Server and 11.1.1.x around Oracle. However, as my environment was SQL Server, not Oracle, I was stuck with figuring it out.
- I am not very good at installations. This may not come as a shock to anyone, especially me. :)
In an upcoming blog post, once I am convinced that I have everything working tickety-boo, I will document the settings and required downloads to make ODI and ODI Studio work in a 64-bit Windows server context.
Putting aside the additional grey hairs and general agita installing ODI caused me, this exercise got me back into the Amazon Web Services (AWS) cloud and that was a life-saver. Just like a virtual machine, I could spin up as many instances of the server as I needed to blunder my way through the install and could snapshot it when I had something halfway working. Unlike a virtual machine running on my laptop, I had 17+ gigabytes of RAM, super-fast networking (you haven’t lived till you switch from DSL to whatever AWS runs – I was getting 39 megabit per second downloads from Oracle’s website), and real server power.
However, as I was looking at my AWS account, I saw that I had a bunch of AMIs, snapshots, and volumes that I couldn’t really account for. Oh, I created them all right, but I hadn’t used them in ages and I was getting billed each month for them. A mass culling ensued but it occurred to me that this is a good time for some basic definitions.
AWS definitions
One of the (many) things that confuse me about AWS is the concept of “volumes”. Simply put, a volume is a hard drive.
Then there are these things called “snapshots”. Snapshots in AWS’ Elastic Block Storage (EBS) world are just what they sound like – snapshots of volumes that you can restore back to at any time.
It is very important to note that the hard drive of an Amazon Machine Image (AMI) (a predefined server you can start) is ephemeral, i.e., your laptop’s hard drive this is not – when the instance is killed, the hard drive is gone. It’s very easy to blow away all of your work if you don’t understand how AWS treats volumes.
This post will cover what a volume is, and how, when, and why you would get rid of a volume (you get charged for each one) as they have a way of piling up when least expected.
What’s ephemeral, and what’s not
A really good explanation of AWS’ drive ephemerality can be found here: http://shlomoswidler.com/2009/07/ec2-instance-life-cycle.html. If you cannot be bothered to jump to a well written blog, the gist is that EBS-backed instances have volumes that persist as long as the instance is not terminated.
And how does that affect you?
Well, when you stop an instance (Stopping an instance is akin to powering down a server) the volume is still extant. It makes sense (to me at least) that a volume hangs around when a server instance is stopped.
When you terminate (Terminating an instance is like you shut down the server, ripped it out of your data center, and naively took it to a recycling center which then had the hardware shipped tout de suite to Liberia for completely unsafe disposal.) an instance, there is a chance the volume will still hang around. But why is it still there when an instance is terminated? Doesn’t that destruction of the instance sort of imply that the hard drive volume should be trashed as well?
Remember, if you started your stopped instance back up, whatever changes you made to your boot drive are still there.
But what about the volume that is the product of a terminated instance? If you reattached it to a new instance, are your changes there? Nope, all of the changes you made are gone.
An example
Let’s pretend that you fired up John Booth’s EPM 11.1.2.1 AMI (go to http://www.metavero.com), did cool stuff, and then terminated the instance. Guess what – that C: drive is still around, and you’re getting billed for it.
Not deleted till it’s detached
Here’s what the web console to my AWS account looks like with four volumes attached to stopped instances and one 100 gigabyte volume from a terminated server instance.
What is that volume doing there? Did I really terminate that instance?
As I wrote, I’m being charged (not very much, but still) for storing that 100 gigabytes. I want to make that unloved hard drive go away.
It’s dead, Jim
That instance is deader than dead. That drive volume is in AWS purgatory.
What’s going on?
That volume is going to hang around till you delete it.
Why? A little searching of the tells us that the AMI must be set up to delete the volume on termination. If it’s not, then the volume must be manually deleted.
NB – A future blog post on launching an AMI from a command prompt will explain how to launch an AMI with that parameter; if the AMI has been set up to not delete the volume on termination, you must manually delete the volume as shown below.
How to delete a volume
You get one more chance to change your mind.
AWS will take a short time to delete the volume:
If you get impatient (it can take a while to delete a volume and the bigger the virtual drive, the slower the delete), you can click on the Refresh button to see the current status.
Until the volume is finally gone.
Conclusion
If the AMI is not set up to delete the volume on termination, you must do so manually, or modify the AMI via the command line interface to delete upon termination.
Set up your AMIs to delete volumes on termination or remember to check and delete available volumes – remember, you are being charged to store drives you no longer use.
Friday, October 21, 2011
What's In A Name: Branding Rail Travel
Popular Posts
-
EPM in Massachusetts Another EPM meetup, another success. Monotonous, isn’t it? Here’s Mark Rinaldi and Norman Williams kicking off th...
-
What happens when a good idea goes bad? Consider Metro-North’s “Quiet Car” initiative. Sixteen years ago a group of regular commuters on Am...
-
With the arrival of winter, now is the time to be sure you’re ready to stay mobile, whatever Mother Nature may throw at us. Here are a few ...
-
I am an installation drama queen Corvus brachyrhynchos is a delicious meal, especially when garnished with a rosemary sprig. Why would I...
-
Introduction Writing this blog post was an absolute stinker. It really is a pity (at least from my bank account’s perspective) that I don’t...
-
If you’re not here, you don’t know what you’re missing Sunday at ODTUG Kscope14 is where Oracle let down their collective hair and tell us, ...
-
Quiet day here in burgos today. It was one of those days where the 175km seemed to pass in the blink of an eye. Infact it was not until we c...
-
Riders on Metro-North just got an early holiday gift from the railroad and CDOT: a bright, shiny new train set… not toy, but real! We’ve...
-
Tired of paying $4+ a gallon for gasoline? Well, your pain has just begun. For decades we’ve lived (and driven) in denial, somehow assum...
-
A triumph, a warning, and a lament Yes, it’s another one of my “All of Gaul is divided into three parts” posts. Or maybe it’s my Descartesi...