Thursday, May 7, 2009

Ashton Kutcher can now get my Essbase calculation updates...

So for an upcoming ODTUG presentation I needed to create some basic CDF's to show as examples; so I decide I had to do something more fun than just logging data or running an executable.  As I was updating my Twitter status I realized there may be an actual business case for having a Twitter account and my CDF example was born... The use case is to follow an Essbase server on Twitter and get updates as calculations are run on the server.

Here is what I did:

  • Set up a new Twitter account (did not want to mess with my own account) http://twitter.com/essbaseserver
  • Using JDeveloper I created a new CDF that sends string updates to twitter.  I did this using JTwitter an open source Java library for access to twitter.

image

  • Registered the CDF and created a calculation script to run while sending the Twitter account status updates.
RUNJAVA com.oracle.essbase.cdf.EssbaseTweet "Running a Calculaiton on the Cube Sample.Basic";
Calc ALL;
fix("Market","Sales","Jan",@LEVMBRS ("Product", 0))
"Actual"(
@EssbaseTweet (
@CONCATENATE (
    @CONCATENATE (        
        @CONCATENATE ("Sales for ", @AlIAS(@CURRMBR("Product")))
                                , " are "), @JgetStringFromDouble (@CURRMBR ("Product"),@_false,@_false)));
)
endfix 
 
RUNJAVA com.oracle.essbase.cdf.EssbaseTweet "Calculation Complete on the Cube Sample.Basic";
 

This runs a calc all and then updates the Twitter account status with sales for level 0 products.  If you follow this twitter http://twitter.com/essbaseserver account you will get updates for all of my testing.  Here is the source.


image

4 comments:

Jeff said...

Essbase is too old and grumpy to understand web 2.0. You're messing with the time/space continum. You know that, right?

Matt Milella said...

I am going to try to pull Essbase out of the 90's even if it kicks and screams...

dlnewman70 said...

Matt, I was trying to work through your twitter solution. I believe now that Twitter has changed their security there is an additional change/authorization that needs to take place. Have you looked at this since Twitter made the change? Have you been successful with using your code since this change was made?

Matt Milella said...

I have not touched it in more than a year. I am guessing your are correct about the twitter API. I looked and JTwitter has an update and a new sample I would start with that. Time permitting I will take a look at this but it is not high on the list as most people thought it was cool but no one was planning to production'ize' it; until now...

http://www.winterwell.com/software/jtwitter.php