Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: str2num problem in Javascript Scripting module...

  1. #1
    Join Date
    Oct 2008
    Posts
    17

    Default str2num problem in Javascript Scripting module...

    Hi,

    I'm trying to convert a value from an input file to a number using str2num, but I'm getting the following error:

    "Could not convert the given String : Unparseable number: "test value test value test value test value test value test value test value test value test value test value" (script#2)"

    But the input file column does not have any fields with the value "test value"...its just numbers. I don't understand why I am getting this error message, any ideas?

    Thanks
    Tim

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

    Default

    Tim,

    The value

    Code:
    test value test value test value test value test value test value test value test value test value test value
    Is obviously a test value. *cough*
    It might or might not be possible to do whatever you want with it. I'm sure you're script will run fine if you tried.

    It's a common problem, we will provide people with a way to enter their own test-data in the next release.

    Matt

  3. #3
    Join Date
    Oct 2008
    Posts
    17

    Default

    I'm not sure what you mean by a its a test value? The input file that contains the values im trying to convert from string to num are just digits.

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

    Default

    And how is the step supposed to know that?

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.