Pentaho

 View Only

 PDI Table Exists job step error

E P's profile image
E P posted 03-05-2023 00:30

Hello all

I have a job which tests whether a table exists or not, and it not then it creates the table with an SQL step.

On the first run it does not find the table and creates it, however on any subsequent run the Table Exists fails to detect the table and tries to create the table again with the following error :  Table 'test' already exists

I'm using PDI v9.4.0.0-343, mariadb-java-client-3.1.2.jar and openjdk 11.0.18

Petr Prochazka's profile image
Petr Prochazka

Hello,

pls could you run job with higher logging level (Detailed or Debug). This have to work. :-)

Or you check table and create in another schema.

John Craig's profile image
John Craig

What is the database you are working with?
Do you have a way to capture the SQL that Pentaho is generating (either on the server itself or using WireShark or similar)?
I seem to remember we had this problem at one point and ended up coding up a SQL query to ask the DB's system tables if the user table existed (returned a 0 or 1) and then put in a filter step either to direct the flow to creation of the table or to a Dummy step.