This goal of this post is to walk you through an awesome business intelligent framework named “Pentaho”. I believe the philosophy of “Learn by Practice”. So, I will show you the steps to get pentaho up and run for a fictitious company. Along with this exercise, you should be able to understand how Pentaho works and what features it provides. Lets start.
Installation of Pentaho
- Download Pentaho Demo (PCI) here
- Read Pentaho Quick Start and the Creating Pentaho Solutions pdf documents. You can get those documents from the download center above as well.
- Unzip the download file will result in a pentaho-demo directory. This is the server root, and it is commonly referred to as the PCI root or PCI install directory or something similar. To start the server, windows users run start-pentaho.bat; *nix users run start-pentaho.sh.
- Open an internet browser, and navigate to:http://localhost:8080/. This may take a little while - the server needs to warm up.
- Now you should see the pentaho web front. Try this sample out to make sure the setup is correctly done.
- Getting Started::Hello World
- Reporting
- Chart Examples. Shows some of the included charting capabilities
- Analysis / OLAP Examples. Demonstrates slice and dice
- Dashboards. There is demo “Flash Dashboard” that actually uses XML-driven free Flash chart. Look pretty good! However, I suggest to use FLEX Charting although it is not free
- When you’re done with pentaho, locate the stop-pentaho script in the PCI installation directory. Execute the script to stop de server.
- For more info of how to set up PCI as server and how to configure email service. Take a look at Roland blog.
Create a new sample
- Start pentaho demo as stated above.
- Create a folder named “MySQL” under %PCI%/pentaho-solutions/samples/mysql.
- To make mysql folder to display at the entry page. We need to put index.xml in the mysql folder. You may notice that we are using variables for name and description. The value of the variables are defined using index.properties under the same folder. The reason to do that is to support internationalization because you can define index_cn.properties for Chinese wording. Note: Click “Update Solution Repository” under Admin tab to refresh the change.
- Download MySQL Sample database - sakila. Here is the schema view.
- Download mysql v5 database and its jdbc driver.
- Run sakila_data.sql and sakila_schema.sql against MySql database. Now you have your sample movie database ready.
-
Create a file named mysql-ds.xml in $DEMO_BASE/jboss/server/default/deploy/
-
 Edit the file $DEMO_BASE/jboss/server/default/deploy/pentaho.war/WEB-INF/web.xml.
Add the following right below solution5 resource-ref entry -
 Edit the file $DEMO_BASE/jboss/server/default/deploy/pentaho.war/WEB-INF/jboss-web.xml.
Add the following right below the solution5 entry. - Copy your mysql jdbc driver library in the following directory:
$DEMO_BASE/jboss/server/default/lib - Create your own myFirst.xaction file.
- Create your own myFirst.properties with title and description.Â
- Restart pentaho
- Open up Firefox (cough IE) and hit the following URL:
http://localhost:8080/pentaho/ViewAction?&solution=samples&path=mysql&action=myFirst.xaction - That’s it!
<index>
    <name>%directory_name</name>
    <description>%directory_description</description>
    <icon>folder.png|dashboard.jpg</icon>
    <visible>true</visible>
     <display-type>list</display-type>
</index>
<?xml version=”1.0″ encoding=”UTF-8″?>
<datasources>
 <local-tx-datasource>
   <jndi-name>sakila</jndi-name>
   <connection-url>jdbc:mysql://localhost/sakila</connection-url>
   <driver-class>com.mysql.jdbc.Driver</driver-class>
   <user-name>root</user-name>
   <password>honr</password>
 </local-tx-datasource>
</datasources>
   <resource-ref>
  <description>sakila</description>
  <res-ref-name>jdbc/sakila</res-ref-name>
  <res-type>javax.sql.DataSource</res-type>
  <res-auth>Container</res-auth>
   </resource-ref>
 <resource-ref>
       <res-ref-name>jdbc/sakila</res-ref-name>
     <res-type>javax.sql.DataSource</res-type>
     <jndi-name>java:/sakila</jndi-name>
 </resource-ref>
<?xml version=”1.0″ encoding=”UTF-8″?>
<action-sequence>
 <name>myFirst.xaction</name>
 <title>%title</title>
 <version>1</version>
 <logging-level>debug</logging-level>
 <documentation>
  <author>Raymond Hon</author>Â
  <description>%description</description>Â
  <help/>Â
  <result-type>rule</result-type>Â
  <icon>SQL_Datasource.png</icon>
 </documentation> <inputs/>
 <outputs>
 <rule-result>
  <type>list</type>
 </rule-result>
 </outputs>
    <resources/>
    <actions>
     <action-definition>
          <action-outputs>
              <rule-result type=”list” />
          </action-outputs>
          <component-name>SQLLookupRule</component-name>
          <action-type>rule</action-type>
          <component-definition>
              <jndi>sakila</jndi>
              <query>
                <![CDATA[select * from actor where actor_id = 1]]>
             </query>
          </component-definition>
     </action-definition>
    </actions>
</action-sequence>






































(4.75 out of 5)
No Comment Received
Sorry the comment area are closed for non registered users