Hitachi Vantara Pentaho Community Forums
Results 1 to 14 of 14

Thread: Problem with Metadata Conversion of Select Values

  1. #1

    Question Problem with Metadata Conversion of Select Values

    Hello All,

    I am using Metadata conversion or Select values control. I'm getting date from a pipe separated file which i am loading into oracle table.

    The format in file is '2008-09-13 16:05:00' and i'm using metadata format as 'yyyy-MM-dd HH:mm:ss' this gets perfectly loaded into the database table as '9/13/2008 4:05:00 PM'.

    But the thing is i'm not sure that the data that i get from the file is reliable.

    If the data in file is '2008-13-22 16:05:00', it is loaded as '1/22/2009 4:05:00 PM'. Probably the str2date(or any) function of kettle is rounding of the date.
    I am sure of this because Oracle raises exception if the data is not correct...

    In most of the cases, i think it is not disirable to have a functionality like this. If the data is not correct then it should raise an error. Thats what is needed rather than a functionality which is not expected.

    So is there any solution to control this unwanted rounding off !!!!

    Thanks
    Deepak

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

    Default

    It's not rounding, when working in lenient date parsing, Java converts "month 13 of 2008" to "month 1 of 2009".
    The Text File Input operator has a function to enable/disable lenient date parsing.

    Nevertheless, it's a good remark, we should probably expose that functionality in the Select Values step.

  3. #3

    Default

    Hello MattCasters,

    Even after disabling lenient date parsing. The problem is still there.

    Input date: 2008-09-35 16:05:00

    Output date: 10/5/2008 4:05:00 PM

    My requirement is that the control should not convert that, so that the oracle can raise exception.

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

    Default

    What "control" is that?

  5. #5

    Default

    Its Text File Output control !!!

  6. #6

    Default

    You mean step deepusrp :P
    This is a signature.... everyone gets it.

    Join the Unofficial Pentaho IRC channel on freenode.
    Server: chat.freenode.net Channel: ##pentaho

    Please try and make an effort and search the wiki and forums before posting!
    Checkout the Saiku, the future of Open Source Interactive OLAP(http://analytical-labs.com)

    http://mattlittle.files.wordpress.co...-bananaman.jpg

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

    Default

    You are using a text file output step to load to Oracle? I'm confused.

  8. #8

    Default

    I am using Kettle 3.0.2.

    It is that TextFile Input (Sorry for the mistake ) control which i am using to get the data from the file.

    I have a select values after that and the database output.

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

    Default

    Ah, someone filed a bug report for that actually:

    http://jira.pentaho.com/browse/PDI-1124

    Matt

  10. #10

    Default

    Hello Matt,

    I checked that link that you specified. The bug is still there.

    This is what i'm getting even after disapling lenient conversion:

    Input date: 2008-09-35 16:05:00

    Output date: 10/5/2008 4:05:00 PM

    How can i make it to raise exception on such cases.
    Last edited by deepusrp; 09-19-2008 at 05:31 AM.

  11. #11

    Default

    Look at the fix versions then check the version you are running! :P
    This is a signature.... everyone gets it.

    Join the Unofficial Pentaho IRC channel on freenode.
    Server: chat.freenode.net Channel: ##pentaho

    Please try and make an effort and search the wiki and forums before posting!
    Checkout the Saiku, the future of Open Source Interactive OLAP(http://analytical-labs.com)

    http://mattlittle.files.wordpress.co...-bananaman.jpg

  12. #12

    Red face Revision ???

    Hello

    That link says Fixed in revision 9026... How to check that.

    I am looking at that spoon interface->help->about. It is showing following details:

    Kettle - Spoon Version 3.0.2

    Build Version: 538

    Build Date: Wed Feb 06...

    Which is that revision that you are talking about. Can i update the existing Kettle or do i have to install the new version???

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

    Default

    That would be version 3.0.5. It's not out yet, but you can download a build here: ftp://download.pentaho.org/client/da...gration/3.0.5/

  14. #14

    Unhappy Date Conversion

    Hello All,

    Since the kettle is deployed in working environment, i cannot upgrade or apply patch on the existing version. So I may need to use the old version itself (3.0.2).

    So i'm having the requirement as follows the date input from the file may come along with time stamp or only date part or NULL or some garbage value. In all the cases, the job should not fail.

    If full date is there, in database full date has to be loaded,
    only date part is there then that alone has to be loaded,
    in case of NULL or garbage value, Null has to be loade in database.

    So which method will be ideal for me now, whether to use regular expression or simple javascript, please suggest me. If u have any code snippet, kindly provide me, it would be of great help.

    Thanks
    Deepak

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.