Friday, January 11, 2013

Adding an XML Data Source in OBIEE 11g


Here’s a quick example of how to manually set up an XML file as a source in OBIEE 11g.
First I created a simple example file named XML_Example.xml. Here is the structure:


Download it here if you want to try it out and are too lazy to type.
Next, create a new database in the physical layer. Set the Database as XML.


We need a Connection Pool. Set the ‘Data Source Name’ as the path to the directory on the server where the XML file is found.


Create a table with the name of the XML file (minus the file extension).


The columns within the table can be called whatever you want. What is important is the XPath declaration which describes how to find the column within the XML tree structure.


We are left with this structure in the physical layer:


Let’s try it out. We can use SELECT_PHYSICAL to query the repository physical layer directly from Administration > Issue SQL. E.g.
select_physical “TOTAL-BI” from “An XML Example”.”XML_Example”;


As if by magic, the data is retrieved from the XML file.