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 16 March 2014

Fetch selected columns from SQL query on Table Component using Penaho CDE

 Hi....
A requirement made me to write this post which will talk about fetching few columns on the table component from SQL query.....
Requirement :
Get 5 columns using query in CDA but fetch only 4 columns on the table component...
Fetch columns first column to fifth column excluding 4th column...

Write below code PostFetch of table Component.

function removeColumns(cdaData) {
var valueColIndex = 3;
    //var valueColIndex2=2; /*initializing 2nd colum with it's index */
    //var valueColIndex3=1; /*initializing 1st column with it's index */

    // Remove metadata column
    cdaData.metadata.splice(valueColIndex, 1/*remove count*/);
    //cdaData.metadata.splice(valueColIndex2, 1/*remove count*/);
    //cdaData.metadata.splice(valueColIndex3, 1/*remove count*/);

    // Remove resultset column, from each row
    cdaData.resultset.forEach(function(row) {
    row.splice(valueColIndex, 1/*remove count*/);
    //row.splice(valueColIndex2, 1/*remove count*/);
    //row.splice(valueColIndex3, 1/*remove count*/);
    });
    // Return modified cda data set
    return cdaData;
}

Write below code in Pre Execution of Table Component

//Specify the columns which you are removin
function f() {
this.chartDefinition.readers = [
  {indexes: 3 /* Value2 */},
    //{indexes: 1 /* Value2 */}
      //{indexes: 2 /* Value2 */}
 
];
}


Alternative solution which will reduce writing above code :

Write below code in "Post Execution" of table component. column indexes start from 1 ,2,3 and etc if you write this code.

function myTip()
{
$('th:nth-child(5),td:nth-child(5)').hide(); //hides 5th column

$('th:nth-child(),td:nth-child(10)').hide();//hides 10th column
}





NOTE:
1) Query fields indexes start from 0 and ends with N-1 where N is the number of fields coming from query.
2) You can fetch as many columns from the query result set as you want.
3) See the commented code to remove the other columns...

NOTE that the code in Pre Execution may not accurate but worked fine for the requirement.

Thank you.


References :
1) http://forums.pentaho.com/archive/index.php/t-143075.html
2)  http://forums.pentaho.com/showthread.php?143075-specifying-columns-for-pie-chart-in-CDE
3)http://www.webdetails.pt/ctools/charts/jsdoc/symbols/pvc.options.charts.Chart.html#readers


Protovis,D3, CCC2 charts useful links .



 Hi Guys,
Below are the collection of pentaho links for dashboards.
·
Protovis charts

D3 charts

CCC v1 charts: Used Provtovis chart library

CCC v2 charts: Using D3 charts library (Protovis are renamed as D3)

CCC-v2 Charts all examples

Changes made from CCC-v1 to CCC-v2

Differences b/w Protovis and D3

Protovis library

Examples in BA Server:
4.8 version BA server:
Plugin-samples ->CDE –CDE Reference -> CCC V2 ShowCase
USEFUL Information:
·         You can find a property called “compactVersion” for every chart that you use in your dashboards.
·         By default the version is 2 , if you use CCC v1 you need change the value from 2 to 1.
Additionally
You can implement protivis charts using Protovis option under Charts of Component panel.
Also you can implement your own charts using Chart Component.

Wednesday 12 March 2014

Increase/decrease the width of pentaho CDE dashboad & increase/decrese spans

Hello Guys,

With the help of a community buddy, today(12th March 2014) I have given a trail on increasing/decreasing the size of the CDE dashboard width & the increase/decrease the width of the spans.

For doing this you need to change the screen.css file
Location of the file :
G:\Pentaho\biserver-ce-4.8.0-stable\biserver-ce\pentaho-solutions\system\pentaho-cdf\js\blueprint

Look for the below code :
/* grid.css */
.container {width:950px;margin:0 auto;}
.showgrid {background:url(src/grid.png);}

Change it as per your dashboard width requirement 
For example:
Increasing the size from 950px to 1600px
/* grid.css */
.container {width:1600px;margin:0 auto;}
.showgrid {background:url(src/grid.png);}
Sample output

In the same way you can increase/decrease the spans sizes listed in this file
For example
.span-1 {width:30px;}
.span-2 {width:70px;}
.span-3 {width:110px;}
.span-4 {width:150px;}
.span-5 {width:190px;}
.span-6 {width:230px}

Change the above as per your requirement and perform  UNIT testing.

NOTE:
Pentaho CDE/CDF layouts follows blueprint css frame work 

References :
Change dashboard total width
http://redmine.webdetails.org/issues/1744

http://ianli.com/blueprinter/?cw=30&gw=20&cc=24

http://forums.pentaho.com/showthread.php?84254-CDE-Dashboard-width

http://www.blueprintcss.org/



 

Monday 10 March 2014

Schema work bench 3.6.1 installation error in Cent OS 6.5 final

Hi Guys,
Today(10th March 2014) , I have tried the installation of Mondrian schema workbench latest in Cent OS 6.5(final)...

I had got Kettle exception.. I have done R&D and came to know that there is an Open bug on installing 3.6.1 in Cents OS..

If any body installed let me know the procedure in comments ..
Mean while I'll find the solution or root cause for it...

Will update this blog as quick as possible.

Saturday 1 March 2014

Null error - when publishing schema to the BA server(4.8 or 5.0.1)

Hi Guys, 
This post teach you how to over come the Publish Error : null when you publishing the schema to the BA server.

Scenario :
Assume you have created schema working fine in PSW(either 3.5 or 3.6 versions) and trying to publish the same to the BA server(either 4.8 or 5.0.1) and struck with Null error when publishing.

Solution :
You need to add the jdbc connector jar files to the BA server.
In 4.8 BA Server you need to add the jar files in two locations
They are:
1) In administration-console folder
G:\Pentaho\biserver-ce-4.8.0-stable\administration-console\jdbc
for instance : copy the mysql-connector-java-5.1.24-bin.jar jar file(assume you developed schema on mysql)

2) In the  biserver-ce folder
G:\Pentaho\biserver-ce-4.8.0-stable\biserver-ce\tomcat\lib
Copy the same jdbc connector that you did in step 1

Also you need to set the publisher password for pentaho server in publisher-config.xml file located at G:\Pentaho\biserver-ce-4.8.0-stable\biserver-ce\pentaho-solutions\system


Once you done with the above steps, you must restart the BA server(bi-server and admin consloe).

Now, publish the schema to server.

Reference :
http://forums.pentaho.com/showthread.php?81614-Error-quot-null-quot-of-publish