Quantcast
Channel: Pentaho Community Forums
Viewing all 16689 articles
Browse latest View live

Multi Parameter Values in Pentaho Report Designer

$
0
0
Hi everbody.
I've a question to ask. I've create custom report UI using Pentaho CDF, I use checkbox to get value that user choose in checkbox for comparison.
The value inside the checkbox is month name:
January February March April Jun
Julai August September November December

In normal SQL statement we will use IN syntax like this:
where month_name in ('January','February','March')

In Report Designer my SQL look like this:
WHERE
month_name in (${month_name})


The problem is when I choose more than 1 month, the report is empty and not show the data. If I choose only 1 month, the report will show up the data.
How to solve this problem?

Multiple if else statement

$
0
0
Hi everyone,
I'm very new to the work enironment and to the pentaho.
My requirement is to have multiple if else conditions in my transformation. I implement it in Formula as

IF (([XXXX] <= 0 ) ; "0";
IF((([XXXX]> 0) && ([XXXX]<= 5000)); "2" ;"5") )

But getting eror as Was expecting one of: ... "(" ... "{" ... "+" ... "-"
How could I overcome it?


Could I use UDJC for this purpose,if so where could I devolop my code?
When I'm searched about UDJC I could not understand anything.

Any help would be greatly appreciated.
Thanks in advance.

Embedding PDI : Calling kjb file from JSP Web Page

$
0
0
Hi I have a kettle Job with a number of sub transformations and jobs. It requires some parametrers to be passed as arguments.
I am trying to call the job from a jsp web page. I tried the following code:

+++++++++++++++++++
A jsp page with a form will get the parameters from the user and from there, i am calling the CallKettleJob() method :


import org.pentaho.di.core.KettleEnvironment;
import org.pentaho.di.core.exception.KettleException;
import org.pentaho.di.core.exception.KettleXMLException;
import org.pentaho.di.job.Job;
import org.pentaho.di.job.JobMeta;

public class CallKettleJob {
String reportDB;
String clientJNDI;
String client;
String fromDate;
String toDate;
String mailto;
String ccto;
String[] parameters = new String[10];

public CallKettleJob (String reportDB,String clientJNDI,String client,String fromDate,String toDate,String mailto,String ccto){
this.reportDB=reportDB;
this.clientJNDI=clientJNDI;
this.client=client;
this.fromDate=fromDate;
this.toDate=toDate;
this.mailto=mailto;
this.ccto=ccto;
}

public void runKettleJob(){
parameters[0]=reportDB;
parameters[1]=clientJNDI;
parameters[2]=client;
parameters[3]=fromDate;
parameters[4]=toDate;
parameters[5]=mailto;
parameters[6]=ccto;

try {
KettleEnvironment.init();
JobMeta jobMeta;

try{
String filename="e_invoice_main.kjb";

jobMeta = new JobMeta(filename,null);

jobMeta.setArguments(parameters);
Job job = new Job(null,jobMeta);
job.start();

job.waitUntilFinished();

if (job.getErrors()!=0) {
System.out.println("Error encountered!");
}
Result result = job.getResult();

} catch (KettleXMLException e1) {
System.out.println("Kettle XML exception");
e1.printStackTrace();
}
} catch (KettleException e2) {
System.out.println("Kettle ENVIRONMENT exception");
e2.printStackTrace();
}


}

}

+++++++++++++++++++
But I am getting this error. All the jar files in Kettle/ data-integration/lib are in the buildpath
org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/pentaho/di/core/exception/KettleXMLException
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)+++++++++++++++++++++

After trying a lot, I swiced from calling job using pentaho java API, and tried calling Kitchen.sh from the webpage using

Runtime rt=Runtime.getRuntime();
String scriptLocation="/kettlescript/";
String arguments="xxx"
Process process=rt.exec("sh "+scriptLocation+"callKitchen.sh "+arguments);

It works. But I want to call the job using the java API. I can do it fine from a java desktop application. Why not in JSP? Do I need to configure something? Please help me out!!

Job/transformation scheduling outside the kettile

$
0
0
HI everyone,

Is there any option in spoon to export the transformation and execute/scedule it outside like in command prompt/crontab in ubuntu.

Any help would be appreciated.

Thanks in advance.

how to get value using message field

$
0
0
Hi,

Can anyone help me to get field value of query using message field in report.


Thanks in advance

Problem loading dashboard on 1st load.

$
0
0
Hi ,

When I load dashboard for the first time then only UI of the dashboards gets loaded charts are not loaded , when I refresh dashboard then it gets loaded properly with charts.

I have bi server installed on separate server machine.
I am using pentaho 5.0.1 biserver.
CDF - 14.07.29(stable)
CDA - 14.07.29(stable)
CDE - 14.07.29(stable)

when I load dashboard for 1 st time I get this error --

SyntaxError: syntax error cdf-bootstrap-script-includes.js:5
The stylesheet http://115.113.146.218:8080/pentaho/Login was
not loaded because its MIME type, "text/html", is not "text/css". generatedContent
SyntaxError: syntax error CDF.js:5
ReferenceError: Dashboards is not defined generatedContent:12
ReferenceError: $ is not defined generatedContent:47
ReferenceError: Dashboards is not defined generatedContent:535
ReferenceError: Dashboards is not defined generatedContent:540
ReferenceError: $ is not defined


I have tried updating CDF ,CDE , CDA versions but nothing works..
:(

It will be a real help if any body can tell me whats wrong ....

Tips: 日本語名でレポート保存

$
0
0
ブラウザでレポートに日本語をつけて保存する時、Chromeでは問題ないのにFireFOXやIEだと日本語確定のエンターキーで保存されてしまう動きをします。
これを解決する方法は pentaho.xmlに<submit-on-enter-key>false</submit-on-enter-key>という行を追加することです。
http://jira.pentaho.com/browse/BISERVER-10699

ちょっとしたことですが知らないと解決にとても時間がかかるので、TIPSとして記述してみました。

Browse Files

$
0
0
Hello to all can some one tell me where is the html page for the browser files. Because I want to change the layout and put it on the Home page. many thanks

TypedTableModel object with ECMAScript

$
0
0
Hi,

I am trying to write a dynamic query script using ECMAScript. I want to create and return a TypedTableModel object in the script. How can I achieve this. Could anyone please help me with this?

[BUG]Character reference "" is an invalid XML character

$
0
0
hi,

I create a job to load data no hdfs filesystem,when run this job in clustering mode,the error occured:Character reference "&#x1" is an invalid XML character.
I think it was because I used the ascii 1("\u001" in java) as the text file seperator.
Attehed is the logfile


14/08/25 19:19:57 - Transformation - </repository></transformation_execution_configuration>
2014/08/25 19:19:57 - Transformation - </transformation_configuration>
2014/08/25 19:19:57 - Transformation -
2014/08/25 19:19:57 - Transformation - Character reference "&#x1" is an invalid XML character.
2014/08/25 19:19:57 - Transformation -
2014/08/25 19:19:57 - Transformation - at org.pentaho.di.core.xml.XMLHandler.loadXMLString(XMLHandler.java:739)
2014/08/25 19:19:57 - Transformation - at org.pentaho.di.core.xml.XMLHandler.loadXMLString(XMLHandler.java:687)
2014/08/25 19:19:57 - Transformation - at org.pentaho.di.trans.TransConfiguration.fromXML(TransConfiguration.java:69)
2014/08/25 19:19:57 - Transformation - at org.pentaho.di.www.AddTransServlet.doGet(AddTransServlet.java:106)
2014/08/25 19:19:57 - Transformation - at org.pentaho.di.www.BaseHttpServlet.doPost(BaseHttpServlet.java:103)
2014/08/25 19:19:57 - Transformation - at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
2014/08/25 19:19:57 - Transformation - at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
2014/08/25 19:19:57 - Transformation - at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
2014/08/25 19:19:57 - Transformation - at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
2014/08/25 19:19:57 - Transformation - at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
2014/08/25 19:19:57 - Transformation - at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
2014/08/25 19:19:57 - Transformation - at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
2014/08/25 19:19:57 - Transformation - at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
2014/08/25 19:19:57 - Transformation - at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
2014/08/25 19:19:57 - Transformation - at org.mortbay.jetty.Server.handle(Server.java:326)
2014/08/25 19:19:57 - Transformation - at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
2014/08/25 19:19:57 - Transformation - at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930)
2014/08/25 19:19:57 - Transformation - at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
2014/08/25 19:19:57 - Transformation - at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
2014/08/25 19:19:57 - Transformation - at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
2014/08/25 19:19:57 - Transformation - at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
2014/08/25 19:19:57 - Transformation - at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
2014/08/25 19:19:57 - Transformation - Caused by: org.xml.sax.SAXParseException: Character reference "&#x1" is an invalid XML character.
2014/08/25 19:19:57 - Transformation - at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
2014/08/25 19:19:57 - Transformation - at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
2014/08/25 19:19:57 - Transformation - at org.pentaho.di.core.xml.XMLHandler.loadXMLString(XMLHandler.java:730)

alternative to nested query in ccc2

$
0
0
Hi, fellows, I have the context above:

1 - before queries looked like to the model: select fields from a left join (
select fields from b
UNION
select fields from c )
where conditions

2 - now, I have to pick data from 2 databases. The query in red from database 1 and the query in green from database 2.
3 - the union were solved using compound queries( UNION)
4 - the union is base for many dashboads. Each dashboard has a diferent condition.

The question is how do I solve the nested query?



only load specifed schema / Oracle

$
0
0
Hi people,


I write you because I am using spoon/kettler to connect to Oracle8 via ODBC (JDBC doesn't work but it isn't the problem). The Oracle database is huge and there is a lot of schemes, by default kettler load all schemes and there is too slow (7 minutes) because there is ~400 schemes.


I want to know how I can be filtered schemes in kettler preferences, I want to load only one scheme. I tried setting "PREFERED_SCHEMA_NAME" with my schema name but it doesn't work =(. Any other ideas?


Thanks a lot


Regards

How to ensure logging of environment variables occurs?

$
0
0
Hello,

I have certain environment variables that I want to have written to a transformation every time the transformation executes.

My main transformation stream reads data from a files and loads it into a database.

I have a parallel stream in the transformation that has only two steps:


  1. Generate Rows
  2. Write to Log


It is in the "Write to Log" step that I write the environment variables to a log.

The problem is the following:

If there is an error in the data on the main stream, the parallel stream that writes to the log file MAY or MAY NOT be executed.
It usually does, but now always. This seems to be random in occurrence.

Is there any way of writing to the log that is ALWAYS ENSURED, regardless of what errors, etc., may occur in the other steps of the transform?

Thanks,
chasse

Saiku widget with parameters

$
0
0
Hello all,

I embeded a saiku report into dashboard using Saiku widget component, but i don't know how to use listners to pass parameters to saiku.
Or are just placeholder?

how to set the socket size and interval get a better performance

$
0
0
hi,

I had creatd a cluster(1 master,2 slaves) :
192.168.11.10:8080 master1
192.168.11.10 :8081 salve1
192.168.11.15:8099 slave2

there are 55m rows in datasource,and they will be sorted 2 times by the cluster(each sort step had 4 copies).machine10 and15 are both 16cpu32procsses,64GB memory.
when no cluster,the job finshed in 43min14s.
then I set th job run in cluster mode,set the socket buffer size is 20000000,set the socket flush interval 50000,it finishd in 47min3s
then I set the socket buffer size is 2000000,set the socket flush interval 10000,it finishd in 33min18s
then I set the socket buffer size is 200000,set the socket flush interval 0000,it finishd in 30min44s

Incorrect Results in Java program using WEKA.

$
0
0
Hi all,

I'm trying to develop a little programm in Java in which I use cross-validation for different J48 options. For example if I use the data breast-cancer.arff with this parameters in J48 = [-C, 0.25, -M, 2] the result in Java is equal than Weka :

Results
======

Correctly Classified Instances 216 75.5245 %
Incorrectly Classified Instances 70 24.4755 %
Kappa statistic 0.2826
Mean absolute error 0.3676
Root mean squared error 0.4324
Relative absolute error 87.8635 %
Root relative squared error 94.6093 %
Coverage of cases (0.95 level) 100 %
Mean rel. region size (0.95 level) 100 %
Total Number of Instances 286

But on the other hand when the next iteration has this parameters in J48 = [-C, 0.25, -M, 2, -B] I don't get the same result than Weka. I get this result:

Results
======

Correctly Classified Instances 202 70.6294 % (in Weka is 72.08%) :(
Incorrectly Classified Instances 84 29.3706 % (in Weka is 27.972%) :(
Kappa statistic 0.199 // The rest are different too
Mean absolute error 0.3627
Root mean squared error 0.4782
Relative absolute error 86.687 %
Root relative squared error 104.6236 %
Coverage of cases (0.95 level) 94.7552 %
Mean rel. region size (0.95 level) 94.7552 %
Total Number of Instances 286

Here is the Java code:

Instances dataTrain = data.getDataTrain(); // dataTrain from breast-cancer.arff
dataTrain.setClassIndex(dataTrain.numAttributes()-1);

// listOptions[0] = " -C 0.25 -M 2 ";
// listOptions[1] = " -C 0.25 -M 2 -B ";

for(int i=0;i<listOptions.size();i++){

J48 j48 = new J48();
Evaluation evaluation = new Evaluation(dataTrain);

j48.setOptions(weka.core.Utils.splitOptions(listOptions.get(i)));
j48.buildClassifier(dataTrain);

evaluation.crossValidateModel(j48, dataTrain,10 ,new Random(1));
System.out.println(evaluation.toSummaryString("\nResults\n======\n", false));
}

Does anyone know why in the second iteration the result is different than in Weka?

Thanks in advance,
Yari.

Sqoop import/export step kettle

$
0
0
Hi All,

I am trying to use sqoop import step of kettle 5.0.1. on my local machine to connect CDH5 3 node cluster.
All other steps "hadoop copy files/hadoop file input/ hadoop file output" are working fine.
But sqoop import step leads to following error :

2014/08/26 12:54:23 - Sqoop Import - 2014/08/26 12:54:23 - Job job_1407851050790_0044 failed with state FAILED due to: Application application_1407851050790_0044 failed 2 times due to AM Container for appattempt_1407851050790_0044_000002 exited with exitCode: 1 due to: Exception from container-launch: org.apache.hadoop.util.Shell$ExitCodeException:
2014/08/26 12:54:23 - Sqoop Import - org.apache.hadoop.util.Shell$ExitCodeException:

Any Idea why this is happening.

Thanks,
Vipin Goyal

Displaying saiku result in a dashboard

$
0
0
Can I use the result chart (using saiku) as a chart in a dashboard? So that when I open the dashboard, it automatically display that particular result in saiku chart form.

By result, I mean the result from crossing the dimensions with measures, I dont really know how to phrase it more correctly lol.

How to get multiplication between different datatypes

$
0
0
Hi everyone,

I'm using formula and follows caluculator. I've to do the multiplication between two fields (in which one of the field is from formula step).
So one field of the fild by default becomes datatype as string and other one is integer. When I'm doing multiplication between these two, I set value type as integer then I could not get the required result.

If I use datatype otherthan integer getting error.
What could I do?

Any help would be greatly appreciated.

Thanks you.

Encoding problem with MySQL data

$
0
0
Hi everybody,
i found a little problem on my transformation, when i try to write "Čaplinskas" on mysql, it gets "?aplinskas". I think is a bit strange it does this error only with this, cause it writes "Šveda" good. I tried to change some parameters (found on another post here) of db connection, and i wrote this on it:

defaultFetchSize 500
collation-server utf8_unicode_ci
clientEncoding utf8
userCursorFetch true
characterEncoding utf8

Probabily clientencoding and usercursorfetch are unusefull, but why still i get the character "?" on db? What can i do to fix that problem?
Viewing all 16689 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>