Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Schemamapping stringreplacer with regexp (!)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
SigTill  
View profile  
 More options May 4 2012, 2:28 am
From: SigTill <shers...@gmail.com>
Date: Thu, 3 May 2012 23:28:52 -0700 (PDT)
Local: Fri, May 4 2012 2:28 am
Subject: Schemamapping stringreplacer with regexp (!)

Is it possible to use the Schemamapper with regexp?

I have a XLS/CSV-file with regexp translations that I want to run on
certain attributes.

For instance I want to rename the value of the attribute MyColor

From:
Feature1.MyColor = my color is yellow
Feature2.MyColor = brown is an ugly color
Feature3.MyColor = Colors for geeks are #6B2525

To:
Feature1.MyColor = Yellow
Feature2.MyColor = Brown
Feature3.MyColor = AnotherBrown

So I want to use the Stringreplacer with regexp (more advanced than this
examples, searching for patterns), but with dynamic input (like with a
schemamapper)

I dont see a way of doing this right now. Any tips?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Ireland  
View profile  
 More options May 4 2012, 12:17 pm
From: Mark Ireland <mark.irel...@safe.com>
Date: Fri, 4 May 2012 09:17:05 -0700 (PDT)
Local: Fri, May 4 2012 12:17 pm
Subject: Re: Schemamapping stringreplacer with regexp (!)
At first glance, the StringReplacer does permit getting the regexp
from an attribute, so I would probably read the CSV, compress it into
a list and add that list to the incoming features.
Then, run them through a custom transformer loop. Use a ListIndexer
inside the loop to fetch the next regexp, and the StringReplacer to
apply it.

If there are conditions - like you might use in a SchemaMapper - then
you'll need to add a Tester transformer instead.

Hope this helps. It's certainly the first thing I would try.

Regards

Mark

Mark Ireland | Senior Product Specialist
Safe Software Inc.
Suite 2017, 7445-132nd Street, Surrey, BC, CANADA
T 604.501.9985 | F 604.501.9965
http://www.safe.com/support | Twitter @FMEDoctors | http://www.fmepedia.com

On May 3, 11:28 pm, SigTill <shers...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »