:       <field column="addr_latitude" splitBy="," />
:       <field column="addr_longitude" splitBy="," />
:       <field column="geo"
: template="${x.addr_latitude},${x.addr_longitude}"/>
: 
: I assume this error is due to the fact that I am not converting the values
: to double prior to concatenation..Do I need to convert the value to double
: (when concatenating ${x.addr_latitude},${x.addr_longitude})? Whats the best
: way to do that?

I don't think that is doing whta you think it's doing.  

If i'm understanding correctly: You are splitting up "addr_latitude" on 
",", which produces an array of values for that field.  then you are 
attempting to use that array as a variable in TemplateTransformer, and i 
*think* that is causing the array (with brackets arround it) to be 
stringified into the value.of the "geo" field.

I think you are expecting the template to be applied pairwise to 
the values from each of your addr_ fields, so that you get a 
multivalued field containing "lat1,lon1" and "lat2,lon2" but instead 
you are getting a single string value containging "[lat1, lat2],[lon1, 
lon2]" where those brackets are part of hte string value....

: 'geo'='[33.7209548950195, 34.474838],[-117.176193237305, -117.573463]'
: msg=For input string: "[33.7209548950195"
        ...
: Caused by: java.lang.NumberFormatException: For input string:
: "[33.7209548950195"

If i'm correct in understanding how your data is coming in, and if you 
then want a multivalued geo field to be produced from it, i think you're 
going to need to use a ScriptTransformer.

either that, or depending on how exactly you are producing those addr_* 
fields in your entities (ie: are you using some xpath or sql construct to 
get those parallel lists?) you might be able to move them into a 
sub-entity and apply TemplateTransformer at that point.


-Hoss

Reply via email to