Uploaded image for project: 'Pentaho Data Integration - Kettle'
  1. Pentaho Data Integration - Kettle
  2. PDI-2782

Error in If Null step, when a Date is used

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: Medium
    • Resolution: Fixed
    • Affects Version/s: 3.2.3
    • Fix Version/s: 3.2.3, 4.0.0 GA
    • Component/s: Step
    • Labels:
      None
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.

      Description

      We use the fields area of the If Null step and say that if the incoming Date (Timestamp) is null, it should be replaced by value 1900-01-01 with conversion mask (Date) yyyy-MM-dd.

      The error we get is: Error in step: Unable to verify if [CREATEDAT String] is null or not because of an error: java.lang.ClassCastException: java.util.Date cannot be cast to java.lang.String

      The error happens in line 2825 of file /src-core/org/pentaho/di/core/row/ValueMeta.java. The program thinks that what we enter is a String. Probably because of the lines 74-76 in /src/org/pentaho/di/trans/steps/ifnull/IfNull.java which set the type for each row to String.

      See also:
      http://forums.pentaho.org/newreply.php?do=newreply&noquote=1&p=224779
      for a sample transformation

        Attachments

          Activity

            People

            • Assignee:
              gdavid Golda Thomas
              Reporter:
              hymmen Holger Hymmen
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: