Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Execute SQL Script

  1. #1
    Join Date
    Oct 2008
    Posts
    17

    Default Execute SQL Script

    Hello,
    I create this script:

    UPDATE RM_IND_ELAB
    SET IND_STATUT = 'REJ'
    WHERE NU_CLE = ?

    In the parameters list I declare the name of field in my stream that have "NU_CLE" value. I have this error.

    2014/11/25 12:48:05 - Execute SQL script.0 - ERROR (version 4.1.0, build 1 from 2012-11-06 13.20.53) : An error occurred, processing will be stopped:
    2014/11/25 12:48:05 - Execute SQL script.0 - ERROR (version 4.1.0, build 1 from 2012-11-06 13.20.53) : Couldn't execute SQL: UPDATE RM_IND_ELAB
    2014/11/25 12:48:05 - Execute SQL script.0 - ERROR (version 4.1.0, build 1 from 2012-11-06 13.20.53) : SET IND_STATUT = 'REJ'
    2014/11/25 12:48:05 - Execute SQL script.0 - ERROR (version 4.1.0, build 1 from 2012-11-06 13.20.53) : WHERE NU_CLE = ?
    2014/11/25 12:48:05 - Execute SQL script.0 - ERROR (version 4.1.0, build 1 from 2012-11-06 13.20.53) :
    2014/11/25 12:48:05 - Execute SQL script.0 - ERROR (version 4.1.0, build 1 from 2012-11-06 13.20.53) : ORA-01008: toutes les variables ne sont pas liées


    2014/11/25 12:48:05 - Execute SQL script.0 - ERROR (version 4.1.0, build 1 from 2012-11-06 13.20.53) : Error initializing step [Execute SQL script]
    2014/11/25 12:48:05 - RM_Reception_marchandises3 - ERROR (version 4.1.0, build 1 from 2012-11-06 13.20.53) : Step [Execute SQL script.0] failed to initialize!

    Thanks.

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Either your setup of the parameter substitution is flawed, or you encounter null values.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Oct 2008
    Posts
    17

    Default

    My parameter is a column in the first input table, in the where clause I have the test : "NU_CLE_IMPUT IS NOT NULL" (NU_CLE_INPUT is the parameter in this step).
    Now I tried to write a text file with NU_CLE_INPUT and I have all the rows, any NULL.

  4. #4
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    If you attach your design we might be able to pinpoint the error.
    So long, and thanks for all the fish.

  5. #5
    Join Date
    Oct 2008
    Posts
    17

    Default

    I delete the SQL script to update my table and I change the output in a text file. All it's ok.
    I changed something in the stream, I replace the UPDATE step and I have this error:

    2014/11/26 08:34:51 - Update Evenement D.0 - ERROR (version 4.1.0, build 1 from 2012-11-06 13.20.53) : Unexpected error :
    2014/11/26 08:34:51 - Update Evenement D.0 - ERROR (version 4.1.0, build 1 from 2012-11-06 13.20.53) : java.lang.ArrayIndexOutOfBoundsException: 1
    2014/11/26 08:34:51 - Update Evenement D.0 - ERROR (version 4.1.0, build 1 from 2012-11-06 13.20.53) : org.pentaho.di.trans.steps.update.Update.lookupValues(Unknown Source)
    2014/11/26 08:34:51 - Update Evenement D.0 - ERROR (version 4.1.0, build 1 from 2012-11-06 13.20.53) : org.pentaho.di.trans.steps.update.Update.processRow(Unknown Source)
    2014/11/26 08:34:51 - Update Evenement D.0 - ERROR (version 4.1.0, build 1 from 2012-11-06 13.20.53) : org.pentaho.di.trans.step.RunThread.run(Unknown Source)
    2014/11/26 08:34:51 - Update Evenement D.0 - ERROR (version 4.1.0, build 1 from 2012-11-06 13.20.53) : java.lang.Thread.run(Unknown Source)

    PS: I tried with two step type UPDATE and INSET/UPDATE...

    Name:  Transform1.jpg
Views: 64
Size:  26.8 KB
    Attached Images Attached Images  
    Last edited by fcavalli; 11-26-2014 at 09:39 AM.

  6. #6
    Join Date
    Oct 2008
    Posts
    17

    Default

    A little note.
    In my stream, I have many validations.
    1. I do a Lookup for a field (For ex.: Lookup Statut général).
    2. If error I have ERR_LookUp... to write in an error table.
    3. Update... to change the status of my input in a joined table.

    I tried to change sequence of this validations and I put my steps with error in the first place. I don't have error. The same error appears in another validation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.