Results 1 to 2 of 2

Thread: Replace Text Node

  1. #1

    Default Replace Text Node

    I'm new to Lavastorm so forgive me if these are dumb questions but I can't find anything that answers them in the documentation or forums.

    I'm using a Replace Text Node and I can get it to work ok to replace one string with another, although the way it works is a bit weird because my column names have spaces in them and I don't have to wrap them in single quotes in this node but I do in an Acquisition Node. Anyway, having got one field with strings replaced, I want to replace the contents of another field in the same node, so:

    Fields
    LVR Leaving Reason=LVR
    LVR NHS Org=ORG

    Rules
    LVR::
    Retirement Age->Retirement - Age
    ORG::
    Undefined->Unknown

    The first rule works fine but the second is ignored. The documentation seems to imply I can have multiple rules but give me no clue as to what the syntax might be. Any comments as to how to do this?

    Another thing I noticed in this node is it irritatingly decides to use Proper rather than as is. So the rule for changing the string "This NHS Trust" actually comes out as "This Nhs Trust"

    Again, I can't see a way around this and it seems such a fundamental thing to be able to do that I don't feel inclined to write a whole load of Perl-like script to get around what appears to be a shortcoming. Again, any comments?

    Incidentally, this test isn't for an NHS Trust - I just happen to be using some NHS data for my evaluation of Lavastorm.

  2. #2
    Lavastorm Employee
    Join Date
    Apr 2014
    Location
    London
    Posts
    57

    Default Replace Text with Filter

    Hi,

    It's probably simpler to use a filter node and the replace operator to do what you want. If I've understood your scenario correctly, the attached example shows you how you can do this. I've chosen to emit all columns but you could ignore the old values if you wished to do so.

    This option should also stop the case change issue. If you need any more assistance please let me know.

    Thanks

    Andy
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •