Continuing on with my love-fest on Essbase Cloud, I wanted to explore another little trick that the nice folks at Oracle have shipped with OAC. Specifically, the ability to run Groovy scripts from Essbase Cloud. The first clue that this is possible, comes from the “Jobs” tab.
Well that’s great, but how do we get a script up and running with Essbase Cloud? No easy answers from the documentation yet. But after a bit of trial and error, this is what I landed on. The “Scripts” section of the database does not give us the ability to create Groovy scripts.
So where do we go from here? Let’s first set up a simple Groovy script. Here’s a 2-liner that basically gives us the version of Groovy that’s available.
Once we save it off with a “.groovy” extension, we can upload the file using the “Files” section of the “Inspect” action. But what happens when we do this?
We run into the error seen above. So, what gives? Turns out there are different ways to save off groovy scripts. Thanks to Mr.Haki, I was able to narrow down the problem to the file extension. BTW, this is an excellent resource for all developers.
Rename the file with a “.gsh” extension, and we are good to go.
If we come back to the “Jobs” area, we can now select the script that we uploaded, and run it.
And there you have it, folks. Another cool little feature that has been slipped in, over the last couple of versions of OAC. Interestingly, also my 50th post. Now back to watching the World Cup.