🥳 RAPIDMINER 9.9 IS OUT!!! 🥳

The updates in 9.9 power advanced use cases and offer productivity enhancements for users who prefer to code.

CLICK HERE TO DOWNLOAD

Cannot retrieve data with "Enrich Data by Webservice"

robinrobin Member Posts: 100  Guru
edited December 2018 in Help

Hi

 

I am connecting to the Google API to reverse geo code locations into addresses. When I run the process below I am not getting the address back from Google. When I put the URL into the web browser, I do get the correc response back. What am I doing wrong?

 

 

<?xml version="1.0" encoding="UTF-8"?><process version="7.5.003">
<operator activated="true" class="read_csv" compatibility="7.5.003" expanded="true" height="68" name="Read CSV" width="90" x="179" y="85">
<parameter key="csv_file" value="/Users/Robin/Desktop/robin.csv"/>
<parameter key="column_separators" value=";"/>
<parameter key="trim_lines" value="false"/>
<parameter key="use_quotes" value="true"/>
<parameter key="quotes_character" value="&quot;"/>
<parameter key="escape_character" value="\"/>
<parameter key="skip_comments" value="false"/>
<parameter key="comment_characters" value="#"/>
<parameter key="parse_numbers" value="true"/>
<parameter key="decimal_character" value="."/>
<parameter key="grouped_digits" value="false"/>
<parameter key="grouping_character" value=","/>
<parameter key="date_format" value=""/>
<parameter key="first_row_as_names" value="false"/>
<list key="annotations">
<parameter key="0" value="Name"/>
</list>
<parameter key="time_zone" value="SYSTEM"/>
<parameter key="locale" value="English (United States)"/>
<parameter key="encoding" value="UTF-8"/>
<list key="data_set_meta_data_information">
<parameter key="0" value="twitter.true.polynominal.attribute"/>
<parameter key="1" value="tDate.true.polynominal.attribute"/>
<parameter key="2" value="tLat.true.real.attribute"/>
<parameter key="3" value="tLong.true.real.attribute"/>
</list>
<parameter key="read_not_matching_values_as_missings" value="true"/>
<parameter key="datamanagement" value="double_array"/>
<parameter key="data_management" value="auto"/>
</operator>
</process>
<?xml version="1.0" encoding="UTF-8"?><process version="7.5.003">
<operator activated="true" class="rename" compatibility="7.5.003" expanded="true" height="82" name="Rename" width="90" x="313" y="85">
<parameter key="old_name" value="tLat"/>
<parameter key="new_name" value="lat"/>
<list key="rename_additional_attributes">
<parameter key="tLong" value="lng"/>
</list>
</operator>
</process>
<?xml version="1.0" encoding="UTF-8"?><process version="7.5.003">
<operator activated="true" class="web:enrich_data_by_webservice" compatibility="7.3.000" expanded="true" height="68" name="Enrich Data by Webservice" width="90" x="447" y="85">
<parameter key="query_type" value="XPath"/>
<list key="string_machting_queries"/>
<parameter key="attribute_type" value="Nominal"/>
<list key="regular_expression_queries"/>
<list key="regular_region_queries"/>
<list key="xpath_queries"/>
<list key="namespaces">
<parameter key="&quot;formatted_address&quot;" value="&quot;formatted_address&quot;"/>
</list>
<parameter key="ignore_CDATA" value="true"/>
<parameter key="assume_html" value="true"/>
<list key="index_queries"/>
<list key="jsonpath_queries"/>
<parameter key="request_method" value="GET"/>
<parameter key="url" value="https://maps.googleapis.com/maps/api/geocode/json?latlng=&lt;%lat%&gt;,&lt;%lng%&gt;&amp;key=<MY KEY>"/>
<parameter key="separator" value=","/>
<parameter key="delay" value="0"/>
<list key="request_properties">
<parameter key="Country" value="formatted_address"/>
</list>
<parameter key="encoding" value="SYSTEM"/>
</operator>
</process>

Thomas_Ott

Best Answer

  • robinrobin Member Posts: 100  Guru
    Solution Accepted

    Remove the comma as a seperator, it kills the field at that point. 

     

    Secondly I used regex to pull the fields I wanted. It seemed to be far friendlier than the Json or XML. 

    sgenzer
Sign In or Register to comment.