Précédent   Forum des professionnels en informatique > Logiciels > Solutions d'entreprise > Business Intelligence > ETL > Kettle-Pentaho
Kettle-Pentaho Forum d'entraide Kettle et Pentaho (Kettle, Pentaho Data Integrator)
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 06/01/2012, 15h05   #1
Membre habitué
 
Homme
Consultant informatique
Inscription : mars 2002
Messages : 211
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : Belgique

Informations professionnelles :
Activité : Consultant informatique

Informations forums :
Inscription : mars 2002
Messages : 211
Points : 133
Points : 133
Par défaut Problème avec Generate Rows et Table Input

Bonjour,

Je débute avec PDI et j'essaie de reproduire un exemple du Cookbook PDI 4.

Je crée une nouvelle Transformation.
J'utilise le composant Generate Rows et je lui donne un nouveau paramètre:
Code :
Nom: productline_par | type: String | Value: Classic Cars
Je fais le preview : OK

J'ajoute le composant Table Input:
Je lui donne les renseignements suivant:
Code :
1
2
3
4
5
6
7
8
SQL:
SELECT
  PRODUCTLINE
, PRODUCTSCALE
, PRODUCTCODE
, PRODUCTNAME
FROM PRODUCTS
WHERE PRODUCTLINE = ?
et comme Insert data from step: Generate Rows.

Je crée un Hop qui va de Generate Rows vers Table Input.
Lorsque je fais le preview: Erreur.

Voici le log:

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
2012/01/06 10:24:37 - Spoon - Logging goes TO file:///C:/Users/ADMINI~1/AppData/LOCAL/Temp/1/spoon_40aa7898-3848-11e1-aa5b-eb2ef3dd2146.log
2012/01/06 10:24:48 - Version checker - OK
2012/01/06 10:24:49 - class org.pentaho.agilebi.platform.JettyServer - WebServer.Log.CreateListener localhost:10000
2012/01/06 10:24:53 - Spoon - Asking FOR repository
2012/01/06 10:24:54 - RepositoriesMeta - Reading repositories XML file: C:\Users\Administrator\.kettle\repositories.xml
2012/01/06 12:06:37 - Spoon - Save AS...
2012/01/06 12:06:37 - Spoon - Save file AS...
2012/01/06 12:09:49 - Spoon - Transformation opened.
2012/01/06 12:09:49 - Spoon - Launching transformation [01]...
2012/01/06 12:09:49 - Spoon - Started the transformation execution.
2012/01/06 12:09:50 - Transformation metadata - NATURAL sort of steps executed IN 5 ms (2 time previous steps calculated)
2012/01/06 12:09:50 - Spoon - The transformation has finished!!
2012/01/06 14:58:42 - /Transformation 2 - Dispatching started FOR transformation [/Transformation 2]
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : Unexpected error
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : org.pentaho.di.core.exception.KettleDatabaseException: 
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : An error occurred executing SQL: 
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : SELECT
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) :   PRODUCTLINE
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : , PRODUCTSCALE
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : , PRODUCTCODE
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : , PRODUCTNAME
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : FROM PRODUCTS
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : WHERE PRODUCTLINE = ?
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : Assert failed: S0000 Direct execute WITH param count > 0java.lang.Exception
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.Trace.getStackTrace(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.Trace.doAssert(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.DatabaseCommandInterpreter.executePart(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.DatabaseCommandInterpreter.execute(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.Session.sqlExecuteDirectNoPreChecks(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.Session.execute(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.ServerConnection.run(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at java.lang.Thread.run(Thread.java:722)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) :  IN statement [SELECT
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) :   PRODUCTLINE
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : , PRODUCTSCALE
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : , PRODUCTCODE
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : , PRODUCTNAME
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : FROM PRODUCTS
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : WHERE PRODUCTLINE = ?]
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.pentaho.di.core.DATABASE.DATABASE.openQuery(DATABASE.java:1912)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:223)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:133)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.pentaho.di.trans.step.RunThread.run(RunThread.java:40)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at java.lang.Thread.run(Thread.java:722)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : Caused BY: java.sql.SQLException: Assert failed: S0000 Direct execute WITH param count > 0java.lang.Exception
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.Trace.getStackTrace(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.Trace.doAssert(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.DatabaseCommandInterpreter.executePart(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.DatabaseCommandInterpreter.execute(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.Session.sqlExecuteDirectNoPreChecks(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.Session.execute(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.ServerConnection.run(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at java.lang.Thread.run(Thread.java:722)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) :  IN statement [SELECT
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) :   PRODUCTLINE
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : , PRODUCTSCALE
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : , PRODUCTCODE
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : , PRODUCTNAME
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : FROM PRODUCTS
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : WHERE PRODUCTLINE = ?]
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.hsqldb.jdbc.jdbcStatement.executeQuery(Unknown Source)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	at org.pentaho.di.core.DATABASE.DATABASE.openQuery(DATABASE.java:1898)
2012/01/06 14:58:42 - TABLE input 2.0 - ERROR (version 4.2.0-stable, build 15748 FROM 2011-09-08 13.11.42 BY buildguy) : 	... 4 more
2012/01/06 14:58:42 - TABLE input 2.0 - Finished reading query, closing connection.
2012/01/06 14:58:42 - TABLE input 2.0 - Finished processing (I=0, O=0, R=0, W=0, U=0, E=1)
2012/01/06 14:58:42 - /Transformation 2 - /Transformation 2
2012/01/06 14:58:42 - /Transformation 2 - /Transformation 2
J'ai tenté la même opération avec un Data Grid. Sans succès.
Si je retire mon paramètre, les données de ma table s'affichent correctemment?

Auriez-vous une idée?

Merci d'avance
L0007 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 07/01/2012, 18h40   #2
Membre éprouvé
 
Consultant en Business Intelligence
Inscription : mai 2008
Messages : 191
Détails du profil
Informations personnelles :
Localisation : France

Informations professionnelles :
Activité : Consultant en Business Intelligence

Informations forums :
Inscription : mai 2008
Messages : 191
Points : 479
Points : 479
Bonjour,

Normalement tu as toutes les solutions des exemples du livre "Pentaho Kettle Cookbook".
Il te suffit de les télécharger ici :
__________________
Sylvain (www.osbi.fr)
sdecloix est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 07/01/2012, 19h47   #3
Membre habitué
 
Homme
Consultant informatique
Inscription : mars 2002
Messages : 211
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : Belgique

Informations professionnelles :
Activité : Consultant informatique

Informations forums :
Inscription : mars 2002
Messages : 211
Points : 133
Points : 133
Bonjour,

J'ai effectivement essayé l'exemple de ce livre avec ces sources.
Mais ça plante quand même. (Même avec leur script).
J'arrive effectivement à me connecter aux DB et à voir les tables.

Si j'effectue un select sans condition, cela fonctionne.
Dès que je mets la condition dans le select, c'est là que ça plante.
L0007 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 08/01/2012, 08h50   #4
Membre éprouvé
 
Consultant en Business Intelligence
Inscription : mai 2008
Messages : 191
Détails du profil
Informations personnelles :
Localisation : France

Informations professionnelles :
Activité : Consultant en Business Intelligence

Informations forums :
Inscription : mai 2008
Messages : 191
Points : 479
Points : 479
Bonjour

Peux-tu indiquer la page et le titre de l'exemple ?
__________________
Sylvain (www.osbi.fr)
sdecloix est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 09/01/2012, 06h08   #5
Membre habitué
 
Homme
Consultant informatique
Inscription : mars 2002
Messages : 211
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : Belgique

Informations professionnelles :
Activité : Consultant informatique

Informations forums :
Inscription : mars 2002
Messages : 211
Points : 133
Points : 133
Bien sûr.

J'ai le livre en version électronique.
Page 14.
Chapitre 1
"Getting data from a database by providing parameters"
et le script se trouve dans les solutions du livre dans le répertoire "03. getting data from a database by providing parameters"

Merci pour votre aide
L0007 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 09/01/2012, 13h27   #6
Membre éprouvé
 
Consultant en Business Intelligence
Inscription : mai 2008
Messages : 191
Détails du profil
Informations personnelles :
Localisation : France

Informations professionnelles :
Activité : Consultant en Business Intelligence

Informations forums :
Inscription : mai 2008
Messages : 191
Points : 479
Points : 479
Je viens de tester la transformation "steel_wheels_products.ktr" qui fonctionne très bien sur la base Hypersonic de Pentaho
(Cf pièce jointe - PS renommer "steel_wheels_products.zip" en "steel_wheels_products.ktr" )

Sur quelle base de données t'appuies-tu ?
Fichiers attachés
Type de fichier : zip steel_wheels_products.zip (14,8 Ko, 4 affichages)
__________________
Sylvain (www.osbi.fr)
sdecloix est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/01/2012, 18h24   #7
Membre habitué
 
Homme
Consultant informatique
Inscription : mars 2002
Messages : 211
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : Belgique

Informations professionnelles :
Activité : Consultant informatique

Informations forums :
Inscription : mars 2002
Messages : 211
Points : 133
Points : 133
Re bonjour,

Sdecloix, déjà un tout grand merci pour ton aide.

Je viens de tester ton script mais malheureusement, il ne fonctionne pas.

J'ai refait des tests sur Mysql et fait quelques recherches sur le net.

Voilà où j'en suis:
1. si je fais une requête dans le table input avec le paramètre en dur, ça fonctionne.
Code :
1
2
3
4
5
6
7
8
9
10
11
12
SELECT
  productCode
, productName
, productLine
, productScale
, productVendor
, productDescription
, quantityInStock
, buyPrice
, MSRP
FROM products p
WHERE productLine= 'Classic Cars'
2. si je fais exactement ce qui est indiqué dans le Cookbook, ça plante et me donne le log d'erreur suivant:
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
2012/01/11 17:26:46 - Spoon - Logging goes TO file:///C:/DOCUME~1/LP/LOCALS~1/Temp/spoon_0e49bccd-3c71-11e1-a59a-afb3e124b843.log
2012/01/11 17:26:48 - Version checker - OK
2012/01/11 17:26:49 - class org.pentaho.agilebi.platform.JettyServer - WebServer.Log.CreateListener localhost:10000
2012/01/11 17:26:51 - Spoon - Asking FOR repository
2012/01/11 17:44:15 - Spoon - Save AS...
2012/01/11 17:44:15 - Spoon - Save file AS...
2012/01/11 18:13:59 - C:\Documents AND Settings\LP\Mes documents\Cookbook\02. Getting DATA FROM a DATABASE.ktr : 02 Getting DATA FROM a DATABASE - Dispatching started FOR transformation [C:\Documents AND Settings\LP\Mes documents\Cookbook\02. Getting DATA FROM a DATABASE.ktr : 02 Getting DATA FROM a DATABASE]
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : Unexpected error
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : org.pentaho.di.core.exception.KettleDatabaseException: 
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : An error occurred executing SQL: 
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : SELECT
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) :   productCode
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : , productName
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : , productLine
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : , productScale
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : , productVendor
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : , productDescription
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : , quantityInStock
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : , buyPrice
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : , MSRP
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : FROM products p
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : WHERE productLine= ?
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : You have an error IN your SQL syntax; CHECK the manual that corresponds TO your MySQL server version FOR the RIGHT syntax TO USE near '?' at line 12
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at org.pentaho.di.core.DATABASE.DATABASE.openQuery(DATABASE.java:1912)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:223)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:133)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at org.pentaho.di.trans.step.RunThread.run(RunThread.java:40)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at java.lang.Thread.run(Unknown Source)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : Caused BY: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error IN your SQL syntax; CHECK the manual that corresponds TO your MySQL server version FOR the RIGHT syntax TO USE near '?' at line 12
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at com.mysql.jdbc.Util.getInstance(Util.java:386)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2619)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2569)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1521)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	at org.pentaho.di.core.DATABASE.DATABASE.openQuery(DATABASE.java:1898)
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : 	... 4 more
2012/01/11 18:13:59 - TABLE input.0 - Finished reading query, closing connection.
2012/01/11 18:13:59 - TABLE input.0 - Finished processing (I=0, O=0, R=0, W=0, U=0, E=1)
2012/01/11 18:13:59 - C:\Documents AND Settings\LP\Mes documents\Cookbook\02. Getting DATA FROM a DATABASE.ktr : 02 Getting DATA FROM a DATABASE - C:\Documents AND Settings\LP\Mes documents\Cookbook\02. Getting DATA FROM a DATABASE.ktr : 02 Getting DATA FROM a DATABASE
2012/01/11 18:13:59 - C:\Documents AND Settings\LP\Mes documents\Cookbook\02. Getting DATA FROM a DATABASE.ktr : 02 Getting DATA FROM a DATABASE - C:\Documents AND Settings\LP\Mes documents\Cookbook\02. Getting DATA FROM a DATABASE.ktr : 02 Getting DATA FROM a DATABASE
Je pense que Mysql n'arrive pas à interpréter mon paramètre:
Code :
2012/01/11 18:13:59 - TABLE input.0 - ERROR (version 4.2.1-stable, build 15952 FROM 2011-10-25 15.27.10 BY buildguy) : You have an error IN your SQL syntax; CHECK the manual that corresponds TO your MySQL server version FOR the RIGHT syntax TO USE near '?' at line 12
3. Si dans mon Table Input, j'active l' option Execute for each row:
Je n'ai plus le message d'erreur mais un message qui me dit qu'il n'a trouvé aucune ligne.
J'ai aussi essayé de mettre des quotes autour de mon ? mais même résultat.

(J'essaye chaque fois d'afficher le résultat via le bouton Preview du table input.)

Je tourne sous Kettle - Spoon 4.2.1
et Mysql 5.5

Ci joint le fichier de transformation (renommer zip en ktr)

Merci pour votre aide
Fichiers attachés
Type de fichier : zip 02. Getting data from a database.zip (9,5 Ko, 4 affichages)
L0007 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/01/2012, 19h06   #8
Membre éprouvé
 
Consultant en Business Intelligence
Inscription : mai 2008
Messages : 191
Détails du profil
Informations personnelles :
Localisation : France

Informations professionnelles :
Activité : Consultant en Business Intelligence

Informations forums :
Inscription : mai 2008
Messages : 191
Points : 479
Points : 479
Je ne comprends pas ton pb

Je viens d'essayer avec la base "SampleData" en MySql (cf fichier sql en Pièce Jointe) et ton traitement fonctionne !!
Fichiers attachés
Type de fichier : zip sampledata_pentaho_mysql.zip (109,0 Ko, 2 affichages)
__________________
Sylvain (www.osbi.fr)
sdecloix est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/01/2012, 22h19   #9
Membre habitué
 
Homme
Consultant informatique
Inscription : mars 2002
Messages : 211
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : Belgique

Informations professionnelles :
Activité : Consultant informatique

Informations forums :
Inscription : mars 2002
Messages : 211
Points : 133
Points : 133


Bon, j'ai bien la même DB mais j'ai quand même essayé avec ton fichier pour être sûr.

Je n'y comprends rien... ça ne fonctionne toujours pas.

Tu utilises quelle version du Kettle et de mySql?
L0007 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/01/2012, 22h30   #10
Membre habitué
 
Homme
Consultant informatique
Inscription : mars 2002
Messages : 211
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : Belgique

Informations professionnelles :
Activité : Consultant informatique

Informations forums :
Inscription : mars 2002
Messages : 211
Points : 133
Points : 133
Je viens d'ajouter un output table a la fin de la transformation.
Et quand je regarde la table dans mon SQL, j'ai le bon résultat.

Bizarre que ça ne fonctionne pas avec le bouton Preview.

Pourrais-tu quand même me donner tes versions de Kettle et MySQL?

Merci
L0007 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 13/01/2012, 14h32   #11
Membre éprouvé
 
Consultant en Business Intelligence
Inscription : mai 2008
Messages : 191
Détails du profil
Informations personnelles :
Localisation : France

Informations professionnelles :
Activité : Consultant en Business Intelligence

Informations forums :
Inscription : mai 2008
Messages : 191
Points : 479
Points : 479
Bonjour

Mêmes versions que toi pour MySql et PDI...

Mais j'ai peut-être une idée: quand tu prévisualises l'étape "output table", il est possible que tu aies sélectionné seulement une partie de la requête SQL avec ta souris => l'ordre SQL exécuté est seulement celui de ta sélection !

C'est souvent une source d'erreur pouu la prévisualisation !

A vérifier
__________________
Sylvain (www.osbi.fr)
sdecloix est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 13/01/2012, 15h57   #12
Membre habitué
 
Homme
Consultant informatique
Inscription : mars 2002
Messages : 211
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : Belgique

Informations professionnelles :
Activité : Consultant informatique

Informations forums :
Inscription : mars 2002
Messages : 211
Points : 133
Points : 133
Vérifié.

Ca ne fonctionne toujours pas.

C'est pas grave, je vais cloturer le topic.

Finalement, j'y suis arrivé avec une étape en plus

Tout grand merci pour ton aide
L0007 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 04h21.


 
 
 
 
Partenaires

Hébergement Web