How the Essbase CLI Login Works

I’ve been using the Essbase CLI ever since it was released with Essbase Cloud in 2017 and although I’d read all the docs, used the CLI to automate tasks, and even given presentations on it, exactly how authentication worked with it always seemed a bit obscure to me. In a very simple workflow, I might call the CLI and then use it to list applications on my server, like this (commands entered are in bold):

tim$ ./esscs.sh login -essbaseurlhttps://myserver/essbase-user myuser -password mypassword
user "myuser" logged in with "Service Administrator" role
Essbase version = 21.3.2.0.0, build = 023
Essbase Command Line Interface version = 21.3.2.0.0, build = 023
tim$ ./esscs.sh listapp
Sample
Demo
MyApp

The thing that always puzzled me is that — unlike, say, MaxL, where once you start a session you are “inside” the tool until you exit — after each Essbase CLI operation you are simply back at the command prompt. So how does the CLI know about my session / login when I go to issue that listapp command?

Continue reading

Use an Essbase Substitution Variable in a Shell Script

A couple of weeks back I was writing some automation scripts on a *nix system (using KornShell, in this case) and needed to do something I haven’t previously tried – grabbing the value of a couple of Essbase substitution variables to use elsewhere in the shell script. I’m sharing a generic version since (as a relatively inexperienced programmer on Unix-like systems) I was pleasantly surprised by how simple the toolset made meeting this requirement, and more generally, the solution I came up with demonstrates several useful techniques from which other *nix neophytes may benefit:

  • Command substitution
  • Inline redirection
  • Filtering multiple lines with grep
  • Extracting tokens from a single line with AWK

Constructive criticism and comments are most welcome!

Continue reading