Sunday, May 11, 2008

Getting Familiar with BIRT ODA

To really get familiar with an Eclipse ODA, I decided to go through the three part "ODA Extensions and BIRT" series by Scott Rosenbaum and Jason Weathersby. It is not publicly linked but can be accessed here by doing some registration. The tutorial is spread across three parts in volume 8, 9, and 14 of the Eclipse magazine.

The end result of the ODA is the ability to use Google Spreadsheets as a data source. This is particularly appropriate for me because I am wrapping up a big networking project where we have been storing the simulation results in a Google Spreadsheet. The project involves the effects of node density on packet delivery ratio for three different wireless routing protocols.

Going through this ODA guide exposed me to Eclipse plugin and ODA concepts and terminology which will be helpful for this project. With respect to ODA, a simple but important point seems to be that of separating design and runtime for the ODA. The first part of the article mainly focuses on the runtime, the second part with the design time (GUI), and the third part with adding logging, optimization, data types, and parameters.

I think the most valuable lesson I learned was with troubleshooting an ODA. Setting up the Logger for the ODA was crucial to solving a snag I ran into. I had the piece of the ODA working that identifies all the user's spreadsheets and then allows you to drill down and select an individual sheet for the query. However, the data preview kept failing with a CannotExecuteStatement error. Well, needless to say, this generic error didn't help identify where the root cause of the problem was. Looking into what the ODA was logging out showed it was throwing a com.google.gdata.util.ServiceException exception. A few alterations to the ODA and I could see the entire stack indicating it was throwing a com.google.gdata.util.InvalidEntryException exception (extends ServiceException) which typically indicates a bad or malformed request. The final step was to log out the actual query that was being made and I could see that the problem was that the filterClause data set parameter was defaulting to 'dummy default value'. Changing this to null allowed the data preview to work. See the image above that shows the node density and delivery ratio data from my project spreadsheet.

The next thing I am going to do is get, build, and become familiar with the OpenMRS ODA. I've also started adding links that are useful to this project to the right navigation area of this blog.

4 comments:

Justin Miranda said...

Kev - Great introduction to the project. Let's talk this week about next steps. The OpenMRS ODA might be complicated to get off the ground given that the Logic Service has been modified a bit since last year. We should actually try to create a Mock OpenMRS REST API that can handle any of the REST calls that we expect the ODA Plugin to make. That way the ODA plugin that you're extending does not need to be tied to OpenMRS so early in the project. We can let the Logic Service evolve a bit before we integrate.

Virgil said...

Hey guys,

There are a couple of resources to make working with ODAs and BIRT easier. First of all, in BIRT 2.2 and higher you can create a simple stubbed out ODA by creating a new ODA Runtime project and ODA Designer project using the project wizards. This will provide an easy example to modify for your own purpose.

You might also want to check out the recorded webinar on Custom BIRT Data Sources available at BIRT Exchange

Anonymous said...

Hello,

I would be very interested in the Birt ODA article series.

However it seems the dowload links at eclipsemag.net are no longer active.

Does anyone have a hint for me how to get those articles?

Regards,
Chris

Anonymous said...

Try this link for the articles: http://www.birt-exchange.org/org/devshare/designing-birt-reports/445-oda-primer-articles/