Skip to main content

Hello all,

I am trying to load a data set from an excel file to our organization's Socrata data portal using FME Desktop 2015.1 and have run into an issue with the address field that Socrata uses for geocoding. Some of the addresses in this data set that I am trying to load have addresses like "NE 19TH ST" when the field will only accept valid addresses like "0 NE 19TH ST". I have tried to just find "NE" and replace it with "0 NE" but it tries to replace all the addresses that might have a "NE" in them.

What I would like to do is search in the address field where the first two positions in the string begin with "NE" then where the records start with "NE" I would like to replace that with "0 NE" leaving the rest of the address intact. The end result would ideally look like this: 0 NE 19TH ST

This is a little cumbersome so a more elegant solution is welcome!

Thank you in advance 🙂

Hi,

Two approaches. Assuming that the attribute name is "address".

StringReplacer (Regular Expression):

Attributes: address
Text to Find: ^(NE.*)
Replacement Text: 0 \1
Use Regular Expressions: yes

AttributeCreator (Conditional Value Setting):

address = 
If @Value(address) Begins_With NE Then "0 @Value(address)"
Else <No Action>

Takashi


Hi Takashi,

Thank you for your response and suggestions. I have tried both solutions (using the field called "location" instead of "address", I misspoke in the original post) and I am still getting the same error that states, "Value in column "location" uninterpretable as location in input at record ###: "NE 19TH ST..."". Since these solutions did not fix the error I am thinking that this may be a question for Socrata so I will forward this on to them to see what they think.

Thank you again for your help!

Amber


Reply