Art of BI: Consuming a Web Service in OBIEE Presentation Services using JQuery CDN

Understanding web services in general is a big benefit for anyone using integrated technologies today.  That includes any system that integrates a web client on a closed intranet network or open network with access to the world wide web.  Because OBIEE presentation services is ultimately a web-based tool using your favorite web browser one would hypothesize that utilization of web services could also be incorporated by bringing in external data or reading from network data sources.

This post will show how to leverage presentation services to pull in a web service and integrate the web service data into our Dashboard.  This is a low level example just to get you thinking about the grand possibilities of the integration.

The data we will consume stems from a Yahoo.com web service built inside an Answers report view.  It does not require any database integration or schema modifications. We will display it in the dashboard.  In the dashboard our final product looks like this:

Create the Answers Report

To create the answers request we need to select at least one column from our schema. I have selected the ACTUALS metric only just make this a simple example but yours may look different when conducting your integration depending on requirements.

Add the Narrative View / Web Service Call Code

Add a Static Text view in order to hold our web service call via dynamic html. As you can see we are combining JavaScript and HTML. We are heavily using tags as we did in my previous Google Maps integration post. You will also notice our use of a JQuery CDN script include tag. We are using Google’s CDN for JQuery. I’ll right another post with more details on the benefits of using a CDN compared to keeping the JQuery file on your own network. But for know you can check our Dave Ward’s post on the topic at Enconsia.com.

I’ll also right a post about using JQuery with OBIEE in the upcoming weeks so stay tuned for that.

In the code below copy and paste it into the “Static Text” field of the static text view. Be sure to check the checkbox “Contains HTML Markup”. Once you do this you will see that only part of what we want to see from our finished example above shows in the “Display Results” section even though the checkbox is checked. I’ll save why this happens in a different post. However know for now that OBIEE prevents dynamic HTML from being displayed in this section due to overriding dynamic syntax inherent in OBIEE presentation services.

Latest Stock Quotes

Weather for Zip Code 28278

Notice in the code above that we are also using the Yahoo’s new web service data source directory and their new query language called Yahoo Query Language or YQL. Starting with the variable declaration “var yqlUrl3=” you can see the YQL syntax. It’s not that crazy. We have already encoded the syntax so that it is safe for http data transfer.

Save and Display

Go ahead and save your Answers request/report. View the results in “Compound Layout”. Now you should see your “Static Text” view if it is the only view you’ve created per this tutorial. Add it to your dashboard or leave it as a stand-alone report and you are ready to rock. There is no difference in adding this report/view to the dashboard in contrast to any others you’ve done in the past. Get crakin’ and have fun.

Conclusion

I believe that there are a lot of great things that we can look forward to with OBIEE especially with the next revision of Answers (Answers+). Right now via the use of web services and other “Mashable” techniques OBIEE can be promoted to even a strong dashboard presentation tool. This gives even more reason for customization of the tool at a client. My simple example of stock quotes and weather reporting is just simple enough to be expounded upon but complex enough to shine some light on integrating non-intrusive data elements to a solution. I will give props again to Venkat for creating a blog a while back about using web services in OBIEE. His post got me thinking about this type of integration.  Although his example is intrusive it shows another way to use web services in an OBIEE integration. I talked about YSQL, CDN‘s, and JQUERY in this post so click on the respective links to find out more about those technologies on your own time. Cheers.

Contact Us
Christian Screen
Christian is an innovator in analytics and data warehousing design, best practices, and delivery. With more than fifteenyears of decision support and data warehousing with key experiences at Office Depot HQ, Sierra-Cedar, and Capgemini, he oversees the Oracle Analytics Practice which includes the technical development and delivery of Oracle BI collaboration software, data warehouse solutions, Oracle BI/EPM projects, and packaged analytics solutions at Datavail.

Leave a Reply

Your email address will not be published.
Required fields are marked (*).

7 thoughts on “Art of BI: Consuming a Web Service in OBIEE Presentation Services using JQuery CDN”
  1. How could the Javascript be changed so that the zip code is based on the user that logged into OBIEE?

    Great example, by the way.

    Thanks

    1. Joel,
      That's a very good question indeed. The problem is that OBIEE is not a user meta-data heavy tool. I could only speculate that since OBIEE does use an LDAP authentication and since it carries around in its session variables (??) your username, what level of access you have, etc. that if we could just squeeze a user's zip code in there we could read from it programatically. As a short answer I would have to say that some custom coding against the OBIEE APIs must be done to do what you seek. I wil take a look into a few ideas I have and will get back to you as soon as I can.

      If anyone else has any ideas or has encountered this please be kind and give us an idea of what your solution was.

      Cheers,
      Christian

  2. I have recently started blogging as well, but my blog is not very good at the moment. I am searching and reading other blogs all day long to get ideas on how to improve my writing and the overall setup and look of my blog to make it more appealing to readers.

    1. Hi Christian. With OBIEE 11g and 12c, does this method of consuming webservices on a dashboard change at all? is it made any easier?
      I have read about Action Link and Web Services in the document… But I am not seeing anything about Showing web service content in Analysis.