Error when writing data to Excel using 'Documents to data'
Hello, I am doing my first Rapidminer project and I am experiencing an issue when trying to gather my data in an Excel file. I have Excel data of Tweets that I analyze using the Aylien Analyze Sentiment extension. This is no issue, however I am not able to transfer this sentiment data to an Excel sheet. I tried the 'documents to data' operator, but it gives my the error message depicted below. The entire process and XML process is displayed below. Does anyone know why I cant get the data to Excel using the documents to data operator? Is there maybe another way to gather the sentiment data in an Excel sheet?
Process:
XML Process:
<?xml version="1.0" encoding="UTF-8"?><process version="8.2.000">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="8.2.000" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="retrieve" compatibility="8.2.000" expanded="true" height="68" name="Retrieve AAPL Tweet test2" width="90" x="112" y="34">
<parameter key="repository_entry" value="//Local Repository/AAPL Tweet test2"/>
</operator>
<operator activated="true" class="com.aylien.textapi.rapidminer:aylien_sentiment" compatibility="0.2.000" expanded="true" height="68" name="Analyze Sentiment" width="90" x="313" y="34">
<parameter key="connection" value="Aylien"/>
<parameter key="input_attribute" value="TEXT"/>
<parameter key="sentiment_mode" value="document"/>
</operator>
<operator activated="true" class="text:documents_to_data" compatibility="8.1.000" expanded="true" height="82" name="Documents to Data" width="90" x="514" y="34">
<parameter key="text_attribute" value="TEXT"/>
<parameter key="label_attribute" value="TEXT"/>
</operator>
<operator activated="true" class="write_excel" compatibility="8.2.000" expanded="true" height="82" name="Write Excel" width="90" x="715" y="34">
<parameter key="excel_file" value="C:\Users\Hjalmar\Documents\Master thesis\Data\Sentiment\Sentiment AAPLlsx.xlsx"/>
<parameter key="sheet_name" value="APL Tweet test2"/>
<parameter key="date_format" value="M/d/yy h:mm a"/>
</operator>
<connect from_op="Retrieve AAPL Tweet test2" from_port="output" to_op="Analyze Sentiment" to_port="Example Set"/>
<connect from_op="Analyze Sentiment" from_port="Example Set" to_op="Documents to Data" to_port="documents 1"/>
<connect from_op="Documents to Data" from_port="example set" to_op="Write Excel" to_port="input"/>
<connect from_op="Write Excel" from_port="through" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
Best Answer
-
lionelderkrikor RapidMiner Certified Analyst, Member Posts: 1,195 Unicorn
Hi @h_jernstrom,
Simply, remove the Documents to Data operator and connect
directly Analyze Sentiment operator to the Write Excel operator.
Regards,
Lionel
0
Answers
@lionelderkrikor Thanks for your help! I did initially try this, but I got another error message. The 'write Excel' operator says the following: Mandatory input missing at port Write Excel.input. Is this due to the file format that the 'write Excel' operator expects to receive?
@h_jernstrom that error leads me to believe that you didn't fill out the parameters in your Write Excel operator. Make sure you set a filename and path.
@Thomas_Ott Thanks for your reply. I actually just now ran it despite the error message, and I successfully got the Excel output that I required, so I guess the error message could be ignored. Issue resvoled, thanks!