Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Text File Input - MySQL Table Output

  1. #1
    Join Date
    Jun 2007
    Posts
    26

    Default Text File Input - MySQL Table Output

    What am I doing wrong? Am using text file input step. Preview shows I've defined columns correctly. Three string columns will be used to look up a row in ouput table before inserting. It appears the select statement for the first record cannot be set because of a # of parameters problem. See RED.

    2008/06/12 08:53:57 - Text file input.0 - Putting row: [S25597335], [025597335], [ 2], [1981-11-12], [JONEON
    ], [null], [MICHAELS ], [null], [null], [ 0], [ 0], [ 0], [null], [null], [null],
    [null], [null], [null], [null], [null]
    2008/06/12 08:53:57 - Student Dimension Update.0 - Dimension Lookup setting preparedStatement to [SELECT
    Sequence_number, version, SSN AS CURR_SSN, DOB, First_name AS CURR_FST, Middle_initial AS MID_INIT, Last_name AS
    CURR_LST, Residence_state AS STATE, Residence_zipcode AS ZIPCODE, Family_income AS FAM_INCOME,
    Expected_family_contribution AS EXPECTED_CONTRIB, Dependancy_status AS DEPENDANCY_STATUS, Parent's_marital_status AS
    PARENT_MARITAL_ST, Mother's_grade_level AS MOTHERS_GRADE, Father's_grade_level AS FATHERS_GRADE, Gender AS GENDER,
    Citizenship AS CITIZENSHIP, Marital_status AS MARITAL_ST, VA_indicator AS VETERAN, date_from, date_to FROM student_dim
    WHERE Student_number = ? AND Student_sequence_number = ? AND Award_year = ? AND ? >= date_from AND ? < date_to]
    2008/06/12 08:53:57 - Student Dimension Update.0 - Finished preparing dimension lookup statement.
    2008/06/12 08:53:57 - Student Dimension Update.0 - lookup row : [025597335], [ 2], [ 0], [2008/06/12
    08:53:57.828], [2008/06/12 08:53:57.828]
    2008/06/12 08:53:57 - Student Dimension Update.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : Because
    of an error this step can't continue:
    2008/06/12 08:53:57 - Student Dimension Update.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) :
    offending row : [STU_NO String(9)], [STU_SEQ_NO String(6)], [AWARD_YEAR String(4)], [date_from Date], [date_to Date]
    2008/06/12 08:53:57 - Student Dimension Update.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) :
    2008/06/12 08:53:57 - Student Dimension Update.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) : Error
    setting value #1 [STU_NO String(9)] on prepared statement (String)
    2008/06/12 08:53:57 - Student Dimension Update.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) :

    java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).
    2008/06/12 08:53:57 - Student Dimension Update.0 - ERROR (version 3.0.2, build 538 from 2008/02/06 13:13:19) :

    Parameter index out of range (1 > number of parameters, which is 0).

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    Transformation?

  3. #3
    Join Date
    Jun 2007
    Posts
    26

    Default Did you mean provide the transformation?

    I'm new to this forum business. Attached is the transformation. Thanks so much for your help. Also, I have tried every combination of data type matching (Integer, number, BigNumber, char, and varchar) between the input text file fields and the column definitions in the target table in MySQL. Same error.
    Attached Files Attached Files

  4. #4
    Join Date
    Jun 2007
    Posts
    26

    Default Sven, did you get a chance to look at this yet?

    Thanks, Jim Snyder

  5. #5
    Join Date
    May 2006
    Posts
    4,882

    Default

    Parent's_marital_status ... don't use the ' in there, same with a couple of other fields.

    You could also raise a JIRA at http://jira.pentaho.org/browse/PDI to quote to those fieldnames.

    Regards,
    Sven

  6. #6
    Join Date
    Jun 2007
    Posts
    26

    Default Thanks, Sven - that was it.

    You saved me a lot of time. I should have asked earlier. Jim Snyder

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.