The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
"Problem Using Enrich Data with Webservice"
I have a dataset with home characteristics (price, size, adress .... ). I want to get the Lat/Long using the following code below:
If I replace all spaces in the address with a '+' character, everything works fine.
If I don't I get an error. Can I add the '+' efficiently inside RM? Is there a setting in the operator "Enrich Data..." that I might be missing?
WORKS:
Property Address
83 543+Boler+Rd
92 1315+Springbank+Ave
94 1278+Springbank+Ave
36 1081+Riverside+Dr
37 831+Riverside+Dr
17 946+Oxford+St+W
DOESN'T WORK:
Property Address
83 543 Boler Rd
92 1315 Springbank Ave
94 1278 Springbank Ave
36 1081 Riverside Dr
37 831 Riverside Dr
17 946 Oxford St W
If I replace all spaces in the address with a '+' character, everything works fine.
If I don't I get an error. Can I add the '+' efficiently inside RM? Is there a setting in the operator "Enrich Data..." that I might be missing?
WORKS:
Property Address
83 543+Boler+Rd
92 1315+Springbank+Ave
94 1278+Springbank+Ave
36 1081+Riverside+Dr
37 831+Riverside+Dr
17 946+Oxford+St+W
DOESN'T WORK:
Property Address
83 543 Boler Rd
92 1315 Springbank Ave
94 1278 Springbank Ave
36 1081 Riverside Dr
37 831 Riverside Dr
17 946 Oxford St W
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.005">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.3.005" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="retrieve" compatibility="5.3.005" expanded="true" height="60" name="Retrieve properties" width="90" x="45" y="75">
<parameter key="repository_entry" value="//Otros/properties"/>
</operator>
<operator activated="true" class="web:enrich_data_by_webservice" compatibility="5.3.000" expanded="true" height="60" name="Enrich Data by Webservice" width="90" x="380" y="75">
<parameter key="query_type" value="XPath"/>
<list key="string_machting_queries"/>
<parameter key="attribute_type" value="Numerical"/>
<list key="regular_expression_queries"/>
<list key="regular_region_queries"/>
<list key="xpath_queries">
<parameter key="latitude" value="//result/geometry/location/lat"/>
<parameter key="longitude" value="//result/geometry/location/lng"/>
</list>
<list key="namespaces"/>
<parameter key="assume_html" value="false"/>
<list key="index_queries"/>
<parameter key="service_method" value="aaa"/>
<parameter key="url" value=""/>
<list key="request_properties"/>
</operator>
<connect from_op="Retrieve properties" from_port="output" to_op="Enrich Data by Webservice" to_port="Example Set"/>
<connect from_op="Enrich Data by Webservice" from_port="ExampleSet" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="252"/>
</process>
</operator>
</process>
Tagged:
0
Answers
I'll create an internal bugreport concerning the spaces in the urls. In the meanwhile you can use the Replace operator to replace \s (all spaces) with +.
Best regards,
Marius