Monday, October 31, 2011

What The Swiss Can Teach Metro-North


Just back from 12 glorious (and outrageously expensive) days in Europe, I have some train tales to tell, and some advice for Americas railroads.

Despite its small size, Switzerland boasts some of the best trains in the world.  Not the fastest (that would be France), but certainly the most dependable. Here are a few things Metro-North could learn from the Swiss railroads.

ON TIME MEANS ON TIME

Metro-North defines "on time" as being within five minutes and 59 seconds of schedule, an industry standard in the US.  When I explained this to a conductor in Switzerland he laughed and asked "How can a train be late and still be on time?"  Exactly.  In this tiny country you can set your watch by the trains coming and going.

TIMETABLES ON STEROIDS

Arrive at a Swiss station to catch a train and you consult a timetable prepared weeks ago, arranged by hour.  Catching the 10:07 to Basel?  That's always on track 12;  on that track you'll see a chart showing every car on that train, which are first class, where the restaurant and Quiet Cars will be and where, exactly, those cars will stop on the platform.  Catch the same train from Grand Central and the track may be different day to day as might be the length of the train.

On the Swiss train you'll be given a list of the stations you'll stop at, which track you will arrive on and the time and track number of all connecting trains.  Arrive at Stamford looking for the New Canaan connection and it's always different... and sometimes a bus.

TREAT THE CUSTOMERS WITH RESPECT

In Europe the on-board announcements (in three languages) always start with " Meine Damen und Herren" (Ladies and gentlemen).  The formality of the culture carries over to the national railroad and customers are respected.  On Metro-North some conductors yell at passengers, call them children and mock them on the PA system.


FREQUENT, CLEAN TRAINS

The heavily traveled corridor along Lake Geneva from Geneva to Lausanne and Montreux is 58 miles long.  That compares to the 82 miles from Grand Central to New Haven.  On our Connecticut line there are three trains an hour at rush hour and just one an hour during the rest of the day.  On the Swiss line there are trains every three to eight minutes, even on weekends.  Some are locals, others expresses and still others long-distance trains just passing thru Switzerland.  But they are all spotless, even the bathrooms.

TAKE THE PLANE TO THE TRAIN

Most major cities in Europe offer high-speed rail from their big airports to downtown and beyond.  At Paris's Charles de Gaulle airport you can hop a 200-mph TGV to anywhere in the country.  Flying out of Geneva or Zurich, you can even check your bag at the train station and pick it up when you land, or vice versa.  Compare that to JFKs AirTrain which will take you to the subway or LIRR, but no farther.

BOOK & TICKET ONLINE

If you want a ticket for Metro-North you can order it on the web and you'll probably have it in a couple of days by mail.  Book a ticket online in Switzerland and you print it on your home computer and hand it to the conductor who scans the QR code on the train, and you're done.

BAR CARS AND MORE

What passes for a meal on a Metro-North bar car (if there is one on your train) is probably a bag of chips and a beer.  On most Swiss trains there's a lounge car serving food and drink or at least a cart that moves between the cars selling everything from fresh brewed coffee and sandwiches to adult beverages.  And they accept credit cards.

SELLING THE SCENERY

Taking a cog railroad thru the Alps is, of course, different than riding Metro-North.  But both pass through some incredible scenery.  On most intercity Swiss trains there is a Panorama dome car, enjoyed even by the locals.  On Metro-North or Shore Line East you're lucky if you can see thru your window, let alone enjoy the beautiful view of the coastline.

AMERICA IS NOT NUMBER ONE

Ever notice that the people who shout "the USA is the greatest country in the world" have often never been outside our borders?  Until he was elected President, George W Bush had never even been to Canada or Mexico!

When it comes to railroads, the US is abysmal.  Amtrak's Acela is a joke compared to high speed rail in the EU and China.  And Metro-North may be the #1 commuter line in the US, but it pales in comparison to any of dozens of regional lines in the EU.

I just wonder Has anyone from Metro-North has ever been to Europe and seen what is possible?

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

UserVariableMemberAlias
BiffAllocation Expense330000Minority Interest Income
BiffAllocation QuarterQ1
BiffCompareScenarioForecast
BiffCompareVersionWorking
BiffCurrent VersionWorking
BiffCurrentScenarioForecast
BiffMy RegionE01_0North America Corporate
BiffMy SegmentBASBookshelf Audio System
BiffRevenue Measure411100Operating Revenue
hypadminAllocation Expense312100Interest Income
hypadminAllocation QuarterQ4
hypadminCompareScenarioPlan
hypadminCompareVersionFinal
hypadminCurrent VersionWorking
hypadminCurrentScenarioForecast
hypadminMy RegionE01_101_1110MA
hypadminMy SegmentSeg01Electronics
hypadminRevenue Measure400000Gross 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:

  1. 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.
  2. 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

Luckily, this is an easy process.  Simply right click on the available volume and select “Delete 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


Don’t be too jealous, but as you read this I’m enjoying a rail adventure in Europe… almost two weeks of riding some of the fastest and best trains in the world… my idea of a real holiday.
As I prepare my itinerary, I’m struck by how well the Europeans “brand” their service.  There is, of course, “Eurostar”, the popular train between London and Paris via “the Chunnel”.  There’s also “Thalys” from Paris to Brussels and Amsterdam, and “Lyria”, a super-fast service from Paris to Switzerland using French TGV’s.

All of these trains sound a lot more exciting than “Acela”, Amtrak’s best effort at high speed rail.  As one-time Amtrak President David Gunn once said, “Everyone knows what Acela is… it’s your basement.”

Amtrak still has some named trains though they are pale shadows of their historic namesakes:  the Silver Meteor and Silver Star to Florida, The Lakeshore Limited to Chicago, The Adirondack to Montreal.

The New Haven Railroad used to name its trains:  The Merchants Ltd., The Owl, The Patriot and Senator.  When Amtrak inherited The Owl, a night train from Boston to Washington, they renamed it “The Night Owl”.  But it was so slow and made so many stops, it was better known as “The Night Crawler”.  It’s long gone.

It may well be that Acela will seem like a slow-poke if a new project takes wing: a maglev train linking New York and DC.  Out of the blue this week I got an online survey from a company testing names for the proposed service.

Among the options I was asked to grade:  “Maglev”, “Quicksilver”, “Aero” and “Magenta”.  Really… magenta?  But clearly these planners know that before they could even propose such a service, it needs an identity.  (PS:  I think this project has zero chance of ever being built, but it’s nice to know someone is thinking bigger and better than Amtrak).

Even stations’ names can evoke grandeur:  Grand Central Terminal (not station!) says it all… big, NY Central and a dead-end.  South Station and North Station in Boston give you a sense of location, like Paris’ Gare de Nord and Gare de L’Est. And Gare de Lyon tells you one of the big cities where the trains are coming from.

On Metro-North most of the station names align with the towns where they are located.  But Westport residents insist on calling their station “Saugatuck”.  And I wish I knew how Green’s Farms got its name.  Coming this fall, “Fairfield Metro” will arrive.

Though it doesn’t name its trains, some Metro-North Bombardier-built cars carry  names tied to Connecticut lore:  The Danbury Hatter (alluding to the city’s old industry), The Ella Grasso (named after our former Governor) and my favorite, The Coast Watcher.

And even before Amtrak, America’s railroads similarly named many cars, especially sleepers, parlor cars and diners.  The long-distance, double-deck Superliners carry the names of the states and such historic figures as A. Phillip Randolph, founder of the Pullman porters union.
So the next time you’re on some generic, 30+ year old Metro-North car known only by a number, think of how much more glamorous your commute could be on a car and train with a name like “The Silver Streak” or “The Weary Commuter”.

Popular Posts