LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Comma in double value

    Employee
    Posted 02-02-2016 05:53

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: cristi.boizas

    Hi guys,

    I am trying to load dynamically some files in a database from a, let's say a delimited file which uses "|" as a separator.
    If I have a column like Price and it has a value of 5,25 in the file, the configuration should say that is a number with 2 decimals.
    However, when I validate this column with .isNumber() , the LAE does not recognize it as numeric value, but as a string ( due to the comma, instead of a decimal point ).
    Also, the metadata converter is not able to convert it to a numeric value.

    Any suggestions for getting around this, apart for replacing the comma with a point ?

    Thanks,
    Cristi.


  • 2.  RE: Comma in double value

    Employee
    Posted 02-02-2016 07:25

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ryeh

    Yeah, I think replacing commas with a period (and then converting to a double) is the only option. Other things to consider:
    1. Are there also periods in there as digit separators?
    2. Are negatives denotes with parentheses?


  • 3.  RE: Comma in double value

    Employee
    Posted 02-04-2016 07:03

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: cristi.boizas

    I am trying to build something generic that can treat both commas and periods.
    The problem is with the change metadata node that is not able to change comma separated decimal values(coming in as strings ) into doubles.


  • 4.  RE: Comma in double value

    Employee
    Posted 03-08-2016 10:32

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: awilliams1024

    Hi Cristi,


    You may be interested to know recent versions of the Lavastorm Analytic Library (LAL) include an Experimental node that reads delimited files using the Power R node (called "Power R Read Delimited File"). The node has an option to specify the decimal point character (as well as a range of other options) - see the 'DecimalPoint' parameter on the Optional tab.


    To use the Power R node your installation would need to be provisioned with the Power R Node Pack license. The latest version of LAL can be obtained from here:

    http://na3.salesforce.com/_ui/selfse...0150000000pH2G

    To Enable Experimental nodes within the BRE client select �Tools� then �Preferences�. On the General Tab select the �Advanced�� button and check the �Use Experimental Nodes� option. The Experimental nodes should now appear in their relevant node categories. The Power R Read Delimited File is in the Acquisition category. Power R nodes use the embedded R engine that is shipped with the Lavastorm product and provides a scalable and resilient R computation platform.


    For customers who are not able to use Power R, a version of the node is attached that leverages an Open Source R Server and the R node. The R node installer can be downloaded from the above link - please ensure you download the version of the installer that matches the 32-bit/ 64-bit architecture of the Lavastorm application software you are using. See the R node release notes for details of how to set up and use the R node (and nodes based on it).

    R_Node_Read_Delimited_File.brg

    Best regards,
    Adrian