Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Data Cleaning - \x00 null characters

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2009
    Posts
    2

    Default Data Cleaning - \x00 null characters

    I am new to using Kettle / PDI tool. I am migrating some data loading scripts in perl to PDI and need to clean the hex00 (\x00 chars) before loading to the database.

    The perl code is as below:

    $s=~ s/\x00//g;

    I used the following code in "Modified Javascript Value" component, and it doesn't seem to work? Any other alternative ways of coding this.

    var
    CleanText = FileText.replace("\\x00", "");

    //var CleanText = FileText;
    //CleanText.replace(/\s+/g,"\0x00");


    Your inputs are much appreciated.

    Regards
    Ravi

  2. #2
    Join Date
    Apr 2009
    Posts
    2

    Default

    I found the solution after a bit of research on javascript.replace function. Here it is ..

    var
    CleanText = FileText.replace(/\x00/g, "");



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.