Pentaho Tools :

Pentaho C-Tools(CDE,CDF,CDA),Pentaho CE & EE Server,OLAP-Cubes,Analysis using Pivot4J, Saiku Analytics, Saiku Reporting, Ad-hoc Reporting using Interactive Reporting Tool,Dashboards,Reports using PRD, PDD,Data Integration using Kettle ETL,Data Mining usign WEKA,Integration of Servers with Databases,Mobile/iPad compatible Dashboards using Bootstrap Css,Drilldown dashboards,Interactive Dashboards

Sunday, 8 May 2016

Stream lookup Step sample example using oracle tables in PDI

Hi,

This is re-blogging from below my previous post :
http://pentaho-bi-suite.blogspot.in/2014/09/stream-lookup-step-explained-with.html

Just thought of doing the same example using Oracle 11g Express database and here are the steps how I did.
You will learn , how to connect to Oracle 11g database and Stream lookup step capability with tables. 

Software Used for this example :  
1) Oracle 11g Express Edition
2) Pentaho Data Integration 6.1 CE

First, we will see how to connect to Oracle 11g Express edition in Pentaho data integration. 

NOTE : 
Before connecting oracle xe database(or database of your choice) download ojdbc6 driver from http://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html site and paste in "lib" folder that can found at kettle installation folder at E:\2_Archive_Installed\Pentaho\6.1\pdi-ce-6.1.0.1-196\data-integration\lib
 
Now,  restart the kettle if it is already running. 
 
1) File -> New Transformation
2) Right click on "Database Connections" node and then click on "New"
3) As shown in below image give all the properties
Host Name : localhost, database name : xe, username and password : sadakar/sadakar
Click on "Test" button to confirm the connection :
Click on "Share Connection" for future usage.

Aim of the post : 
 lookup the data coming from employee(source) table with department (lookup) table  and insert the location field from department table in empolyee_with_locations (target) table.

Source table : employee
Target table : employee_with_locations
Lookup table : department

 DDL and sample data for employee and department table is as follows 
employee table
CREATE TABLE SADAKAR.employee
(
  EmpID INTEGER primary key
, Name VARCHAR2(30)
, DeptID_Emp INTEGER
)
;

SELECT * FROM employee
 
empid name    deptid_emp
110    Sadakar    10
111    Hasini    10
112    Dolly    20
113    Kutti    20
114    Jikky    30

department table
CREATE TABLE SADAKAR.department
(
  DeptID_Dept INTEGER primary key
, DeptName VARCHAR2(30)
, Location VARCHAR2(2000)
)
;
SELECT * FROM department
deptid_dept deptname location
10    Mathematics    Netherlands
20    Computers    USA

Also create DDL for target table 
employee_with_locations
CREATE TABLE SADAKAR.employee_with_locatioins
(
  empid INTEGER primary key
, name VARCHAR2(30)
, dept_id INTEGER
, location VARCHAR2(2000)
)
;

Now, design the transformation as shown in below image. 
Double click on Stream lookup step and specify the lookup ids and get the retrieve field as shown in below image

Now save the transformation and preview the output. 
Output should be :

Lastly, the difference between "Stream lookup" and "database lookup" is here. 

Stream lookup stores the data in memory and then it will start doing all of the lookups, data can come from anywhere (from file or table)
Database lookup looks up data from a database, and only touches the data you lookup.

References :
http://forums.pentaho.com/showthread.php?65356-Difference-between-stream-value-lookup-and-database-lookup-step

I hope it helps some one.! 

Sadakar Pochampalli

Friday, 29 April 2016

Pentaho Ctools(CDE,CDF,CDA & CGG) technical interview questions

Hi,

I have written basic to intermediate level Ctools interview questions.  

Sample Questions : 
1) How do you write MDX queries in CDE ? How do you feed a chart component with MDX ?
2) What are parameters and listeners ? What is the parameter syntax ? 
3) What are widgets ? give an example
4)  What is cross tab mode & Series in rows for a CCC chart component ?
5)  What are extension points ? Give at least 5 examples.


Download 40+ interview questions here: Click Me

 Cheers..!!!

Thursday, 28 April 2016

Charts CGG Component example in Pentaho CDE

Hi,

This tutorial helps you in understanding Charts CGG Component.

More About CGG : 
http://www.webdetails.pt/ctools/cgg/
http://pedroalves-bi.blogspot.in/2012/09/cgg-putting-ccc-charts-in-pentaho.html
http://diethardsteiner.github.io/prd/2015/02/10/Pentaho-CCC.html

 Webdetails says about CGG
Open up an existing CDE Dashboard in Edit Mode and press the keyboard shortcut "Shift + G". This will prompt a popup, where you can choose which charts in the Dashboard you want to render as CGG charts.
When you save the Dashboard, CGG will generate a JavaScript file for each chart chosen in the popup, and will save it in your Pentaho Solution directory. Those JavaScript files are, basically, CCC chart definitions.

Example : Explanation  with  2 dashboards
1 is for regular dashboard and another is for CGG images dashboard.
Software Environment :
1) Pentaho BA 6.1 CE Server
2) Ctools

Dashboard-1 : 

Lets assume you have below shown dashboard
Open the dashboard in Edit mode and press Shift+G, it will open a pop window.

Observe the generated JS files in the location where the dashboard is saved, for example.

Dashboard-2 :

Design the layout and take two CGG components from CCC Charts as shown below  and give
Cgg path for the Js files generated in dashboard-1

Cgg path for Pie chart in Dashboard-1 : public/test/1_chartPie.js
Cgg path for Dot chart in Dashboard-2 : public/test/2_chartDot.js

NOTE : Cgg Path = Path of generated JS files 

(it can be done in single dashboard also)

(Click the image)

2nd Dashboard Preview : (Click on the image)

NOTE : 
#) In 2nd dash board it is not required define any query components.  
#) 2nd dash board will render the SVG images generated in 1st dashboard and get the image looks like dashboard view. 

Download :
Dashboard-1  & Dashboard-2 :
Click Me 
Deployment:  
Upload the two zip files to Public folder and run PostgreSQL foodmart database in your environment (or change the connections and queries as per your environment).

References : 
http://forums.pentaho.com/showthread.php?146887-Define-Size-of-dot

Learn how to create and use Templates in Pentaho CDE

Hi,
This tutorial teach you how to create & use templates in Pentaho CDE.

Why templates ? 
Templates are pre-defined structure of basic reports/a dashboard.
Whenever you have similar structure for some 4 or 5 dashboards in a project and if you use template you can faster the development time.

Pentaho CDE templates can include Layout, components and Data sources. In simple terms if you save a dashboard as template it will available in "My Templates" section.

Click on this image:


Lets see how to convert a dashboard as a template and use it in a new dashboard creation.

Steps to create a dashboard and convert it as Template
1) File -> New -> CDE dashboard
2) Now, lets layout the dashboard (that we will save as template) as shown in below image
3) Lets define data source connections in "Data source sections" as shown in below image
4) Save the dashboard in some folder in repository and see the preview of the dashboard and the sample is some thing similar to the one shown below.

(Please click on Image for best view)
5) Making dashboard as template 
a) Click on "Save as Template" as shown in below image
b) It will open a popup window. Fill the name, title and check the components and data sources.

c) Now, this saved template "Template_sadakar_sample_2" will be available in "My Templates" section.

6) Applying Template ( Checking whether the template is available or not )
#) click on "Apply" template button.
#) From the opened popup, click on "My Templates" button as shown below

#) Now chose the template created and click on "OK" button.
#) Click on "OK" button..

#) Save the dashboard that is being applied with above template.


This way one can work with templates in CDE editor. I hope it helps some one.!

Sadakar

Passing Blank from Select component - Dispaly All values when you pass Blank(say null) and display specific content when you pass specific value in Pentaho CDE

Hi Folks,

Its always a fun to me to explore a functionality in CDE.!
In this post you will see how to pass Blank ( Assume a NULL) value to  a CCC Bar chart component that should display all bars in graph.

Few questions ? 
1) Did you ever observe Blank/NULL (Say empty value) in a String type select component ?
2) Did you ever pass Blank value to display the whole content ? ( to a chart or to a table component).
   ( NOT "All" value in drop down)

NOTE : Click on images for the content on it

Here is a USE CASE : 
* Display employee "Position Titles" on X axis and "Salaries" on Y-Axis according to "Education Level".
i.e., filter the employee data with "Education Level".
When you pass "BLANK" value you should get the whole content and when you pass "Specific education level" get the data for that specific level.  (Here the employee content is : "Position Titles" on X-axis and "Salaries"  on Y-axis )

Software Environment for this example : 
1) Pentaho BA Server 6.1 CE
2) Pentaho CTools (16.x)
3) Jaspersoft foodmart database - PostgreSQL

1) Dashboard Design 
Design the dashboard as shown in the final output image.  (Not explaining how to work with rows and columns and create html objects - Assuming that you are aware in designing basic layouts). 

2) Components section : 
Creating parameter : 
Parameter : param_education_level
Default value : ' '    (Single quotes & one space in between)

Creating Select Component : 
Name : select_dept_id
Parameter :  param_education_level
Listner : param_education_level
Data source : query_param_dept_id
HTML Object : col_param
Creating bar chart component : 

 3) Data sources section : 
Preparing SQL for parameter : 
SELECT education_level FROM
(
            (SELECT ' ' :: text  AS education_level FROM employee limit 1)
            UNION ALL
            (SELECT DISTINCT education_level::text AS education_level FROM employee )
) a ORDER BY a.education_level


 Preparing SQL for Bar Chart Component
SELECT
               position_title,
               SUM(salary) sal
FROM employee 

WHERE  
         (education_level :: text = ${param_education_level} OR ${param_education_level}=' ')
GROUP BY 

position_title

NOTE : Check CDA preview for the confirmation of data source connection and queries result sets.

Save the dashboard and preview it. 

TEST- 1: Passing Blank Value


TEST-2 : Passing "Partial High School" value from "Education Level" parameter


Few Points & Limitations on this example :
1) ORDER BY for integer inputs may not be sorted (Its depends on how you concatenate ' ' with integer value in SQL).
2) Some times for the first load of the dashboard it is displaying "No Data". (Oops.!).
3) When you map a parameter to a "Select Component" (Single Select) you wont get any special symbol or blank space in the drop down. ( One can find -- dashed lines in Jaspersoft Server for input controls to pass it as NULL value).
4) This example is not intended to replace "All" functionality in the drop down.

Download Example : 
Click Me

Thank you :-) Hope it helps someone.


Wednesday, 27 April 2016

Tip : Activate Pentaho Ctools in Enterprise BA Server 6.x

Hi, 
This post will help you in configuring CDE in EE server.
Environment for this example is :
BA Server EE 6.0.1

1) To make CDE editor available in Pentaho EE server you need to edit code related to it in xml configuration files. files are :  plugin.xml and settings.xml

2) Both files are available at C:\Pentaho\server\biserver-ee\pentaho-solutions\system\pentaho-cdf-dd location.

3) Editing plugin.xml file 
Place-1 : uncomment below code 
             <operation>
                    <id>EDIT</id>
                    <perspective>wcdf.edit</perspective>
                </operation>


Place-2 : uncomment below code 
<overlays>
        <overlay id="launch" resourcebundle="content/pentaho-cdf-dd/lang/messages">
            <button id="launch_new_cde" label="${Launcher.CDE}" command="Home.openFile('${Launcher.CDE}', '${Launcher.CDE_TOOLTIP}', 'api/repos/wcdf/new');$('#btnCreateNew').popover('hide');"/>
        </overlay>
        <overlay id="startup.cde_dashboard"  resourcebundle="content/pentaho-cdf-dd/lang/messages" priority="1">
            <menubar id="newmenu">
                <menuitem id="new-cde_dashboard" label="${Launcher.CDE}" command="mantleXulHandler.openUrl('${Launcher.CDE}','${Launcher.CDE_TOOLTIP}','api/repos/wcdf/new')" />
            </menubar>
        </overlay>
    </overlays>

   
4) Editing settings.xml file 
Define the button for CDE  in Server
Un comment below code that you find at the end

<new-toolbar-button>1,New CDE Dashboard,CDE Dashboard,api/repos/wcdf/new</new-toolbar-button>



Pentaho Offcial Documentation : 
https://help.pentaho.com/Documentation/6.1/0R0/CTools/Activate_CDE

Download the same as PDF file : Click Me.

 

Tuesday, 26 April 2016

Pentaho EE 6.0.1 complete pack installation images for Windows 64 bit OS

Its been almost 4 years, I had installed Pentaho EE 4.8 server for the first time and later never got a chance to  get EE copy at office or home.. Hmm..!!! CE occupied EE's place in bucket :-)

Installation Environment : 
Windows-7 Professional , 64 bit OS with 8 GB RAM. 


Pentaho EE 6.0.1.386 Server installation images.

Download Location: http://www.pentaho.com/download






1)

2)
3)
4)

5)
6)
7)
8)
9)
10)
11)
12)
13)
14)
15)




Services :



 Menu Bar : 



Installation folder structure : 











Thank you. :-)

Thursday, 21 April 2016

Back to Basics on Dual Axes Line Chart example in Pentaho CDE

H,
Its been again longtime I wrote something useful that I explored in  Pentaho or Pentaho Ctools.

Thank you Tharun for making me look back into the basics again. Here is the use case we together explored with foodmart sample data.

Use Case : 
Get 2 lines for Y1- Axis : storecost, storesales
Get 2 lines for Y2- Axis : unitsales, profit

This example is explained step by step in the presentation attached to this post. (Please look at download section).

I hope it will be useful if you have the similar kind of functionality.

Sample screenshots of the presentation : 

Image -1 : Please click on image to get best view
Image-2 : Sample output : please click on image to get best view


Download :
1) Presentation
2) Example : Works on foodmart db.

NOTE : Presentation is password protected. Please send me a request to have a copy of it. 

Click me to download 

:-)

Sunday, 27 March 2016

Box Plot Chart example in Pentaho CDE Dashboard designer

Hi,

In this post, you will see how to develop a box plot chart in Pentaho CDE.

Oops!!! No more theory I am going to write here but uploading a presentation having 5 to 10 slides.
By going through the slides that have step by step screen shots, you can quickly & easily learn how to work with it.

If you want to know more about what is box plot ? Read here : https://en.wikipedia.org/wiki/Box_plot 

OR
http://www.physics.csbsju.edu/stats/box2.html




Important point: 
When you work with CCC Box plot chart component make sure CrossTabMode=False


Few sample Screen shots from the Presentation : 

1)  Data Format for Box plot Chart ( ** Click on Image to get best view of content placed)

2) Sample output in CDE ( ** Click on Image to get best view of content placed)




Download Example & PPT : Click Me

NOTE: Presentation is password protected, please request for a one.