Hitachi Vantara Pentaho Community Forums
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Removing a Date field via "Select Values" Step fails

  1. #1
    Join Date
    Mar 2009
    Posts
    10

    Default Removing a Date field via "Select Values" Step fails

    I have a Select Values Step where I am trying to trim off the fields I used to feed a web service call. The Input Fields list looks like:

    Fieldname Type Length Precision Step origin Storage Mask Decimal Group Trim Comments
    clientTimeStamp Date - - Fix Client Date Format normal dd/MM/yyyy hh:mm:ss aa . , none
    clientIP String - - Get System Info normal . , none
    user String 15 - Fix Client Date Format normal none
    password String 15 - Fix Client Date Format normal none
    company String 15 - Fix Client Date Format normal none
    clientOsUser String 15 - Fix Client Date Format normal none
    groupQuery String - - Add Group Query normal . , none
    return String - - Find Groups WS normal . , none
    groupName String - - Get Group Names normal none

    When my "Select & Alter" tab looks like the following:

    Fieldname Rename to Length Precision
    groupName queryGroupName

    I get the following error when running the Transformation:

    2009/03/26 15:11:59 - Trim to Group.0 - Got row from previous step: [26/03/2009 03:11:57 PM], [192.168.168.75], [WOD Report], [WOD Report], [Default Company], [dmccorison], [ <searchParameters><description><description><groupName>%</groupName><member></member></searchParameters>], [<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:FindGroupsResponse xmlns:ns="http://www.alarmpoint.com/webservices/schema"><ns:return type="com.invoqsystems.apex.web.soap.FindGroupsReturn"><ns:matchingGroups type="com.invoqsystems.apex.web.soap.SoapGroups"><ns:group type="com.invoqsystems.apex.web.soap.SoapGroup"><ns:description xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" /><ns:name>Mibble</ns:name><ns:targetName>Mibble</ns:targetName></ns:group><ns:group type="com.invoqsystems.apex.web.soap.SoapGroup"><ns:description>Sample Group</ns:description><ns:name>Operations</ns:name><ns:targetName>Operations</ns:targetName></ns:group></ns:matchingGroups><ns:serverTimestamp>26/03/2009 10:11:59 PM</ns:serverTimestamp><ns:status>OK</ns:status></ns:return></ns:FindGroupsResponse></soapenv:Body></soapenv:Envelope>], [Mibble]
    2009/03/26 15:11:59 - Trim to Group.0 - ERROR (version 3.2.0-RC1, build 10435 from 2009-03-20 09.51.14 by buildguy) : Unexpected error :
    2009/03/26 15:11:59 - Trim to Group.0 - ERROR (version 3.2.0-RC1, build 10435 from 2009-03-20 09.51.14 by buildguy) : org.pentaho.di.core.exception.KettleValueException:
    2009/03/26 15:11:59 - Trim to Group.0 - ERROR (version 3.2.0-RC1, build 10435 from 2009-03-20 09.51.14 by buildguy) : queryGroupName String : There was a data type error: the data type of java.util.Date object [Thu Mar 26 15:11:57 PDT 2009] does not correspond to value meta [String]
    2009/03/26 15:11:59 - Trim to Group.0 - ERROR (version 3.2.0-RC1, build 10435 from 2009-03-20 09.51.14 by buildguy) :
    2009/03/26 15:11:59 - Trim to Group.0 - ERROR (version 3.2.0-RC1, build 10435 from 2009-03-20 09.51.14 by buildguy) : at org.pentaho.di.core.row.ValueMeta.getString(ValueMeta.java:1344)
    2009/03/26 15:11:59 - Trim to Group.0 - ERROR (version 3.2.0-RC1, build 10435 from 2009-03-20 09.51.14 by buildguy) : at org.pentaho.di.core.row.RowMeta.getString(RowMeta.java:182)
    2009/03/26 15:11:59 - Trim to Group.0 - ERROR (version 3.2.0-RC1, build 10435 from 2009-03-20 09.51.14 by buildguy) : at org.pentaho.di.core.row.RowMeta.getString(RowMeta.java:581)
    2009/03/26 15:11:59 - Trim to Group.0 - ERROR (version 3.2.0-RC1, build 10435 from 2009-03-20 09.51.14 by buildguy) : at org.pentaho.di.trans.steps.selectvalues.SelectValues.processRow(SelectValues.java:377)
    2009/03/26 15:11:59 - Trim to Group.0 - ERROR (version 3.2.0-RC1, build 10435 from 2009-03-20 09.51.14 by buildguy) : at org.pentaho.di.trans.step.BaseStep.runStepThread(BaseStep.java:2861)
    2009/03/26 15:11:59 - Trim to Group.0 - ERROR (version 3.2.0-RC1, build 10435 from 2009-03-20 09.51.14 by buildguy) : at org.pentaho.di.trans.steps.selectvalues.SelectValues.run(SelectValues.java:422)

    This of course screws up the rest of my process. What is annoying is that when I have logging set to "Basic Logging" this error does not appear at all, instead I get a NullPointerException from further down the step chain, which makes it difficult to figure out what is wrong.

    Note that if I pass the "clientTimeStamp" field through the Select Values step as the first field, I don't have any problems. However, when I moved it to the end of the list, I had the same issue.

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

    Default

    Code:
    queryGroupName String : There was a data type error: the data type of java.util.Date object [Thu Mar 26 15:11:57 PDT 2009] does not correspond to value meta [String]
    You try to push a date object in a String. Why it's not when you lower logging... I don't know... probably PDI is aware of the wrong data when it sees it while logging... but as you've noticed it will blow up later any way.

    Are you possible using multiple tabs in the select values step... like removing/renaming at the same time.

    Regards,
    Sven

  3. #3
    Join Date
    Mar 2009
    Posts
    10

    Default

    Quote Originally Posted by sboden View Post
    Code:
    queryGroupName String : There was a data type error: the data type of java.util.Date object [Thu Mar 26 15:11:57 PDT 2009] does not correspond to value meta [String]
    You try to push a date object in a String. Why it's not when you lower logging... I don't know... probably PDI is aware of the wrong data when it sees it while logging... but as you've noticed it will blow up later any way.

    Are you possible using multiple tabs in the select values step... like removing/renaming at the same time.

    Regards,
    Sven
    Note: PDI is trying to push the Date to a String, not me! I don't want that Date field any more. It existed solely as input to a Web Services step earlier in the Stream.

    No, I am only using one tab on the Select Values Step, the "select and alter" tab.

  4. #4
    Join Date
    Mar 2009
    Posts
    10

    Default Additional Data Point

    Ok... I found a work-around, but it doesn't really fix the issue:

    I moved the field in the step I created it to second in the list, instead of first. Now the step with only the single select values works.

    But... when I put in a new step later with only two entries in it, the problem recurs.

    So, I added a junk field at the beginning of the problem step. Problem solved... at least until I want to select 3 fields...

    FYI, the field comes from a Get System Info step and is using the "system date (fixed)" value.

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

    Default

    Attach your transformation

    Regards,
    Sven

  6. #6
    Join Date
    Mar 2009
    Posts
    10

    Default Here's a simple one...

    Quote Originally Posted by sboden View Post
    Attach your transformation

    Regards,
    Sven
    Be sure to turn your logging up to "Rowlevel (very detailed)" to be sure to see the error, it doesn't show at "Basic Logging" level though the step does show in red on the Step metrics.
    Attached Files Attached Files

  7. #7
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    It's a logging error, doesn't involve the normal operation of the step.

  8. #8
    Join Date
    Mar 2009
    Posts
    10

    Default

    Quote Originally Posted by MattCasters View Post
    It's a logging error, doesn't involve the normal operation of the step.
    Unfortunately, my experience shows otherwise. When I had only one row (as shown in the initial example), later steps would crash.

    When I had two or more rows, then the select step would crash.

    See the updated example.
    Attached Files Attached Files

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

    Default

    Then you still have other issues... the problem was only in the logging. Matt fixed just fixed it, the fix will be in 3.2. You can try out the bleeding edge version from http://ci.pentaho.com/job/Kettle/

    Regards,
    Sven

  10. #10
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Or simply don't run in RowLevel logging mode.

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.