Re: How to output each tweet as separate text file
Shaheen
New Altair Community Member
Thanks again,
Unfortunately it is not working. while connecting Data to Documents to Write Document operator, it is giving an error message of wrong connection.
Tagged:
0
Answers
-
Try it with a Write CSV. That lets you write as TXT files too.
Why is this thread in the Developers forum?
<?xml version="1.0" encoding="UTF-8"?><process version="7.3.001">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="7.3.001" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="social_media:search_twitter" compatibility="7.3.000" expanded="true" height="68" name="Search Twitter" width="90" x="45" y="34">
<parameter key="connection" value="ThomasOtt"/>
<parameter key="query" value="RapidMiner"/>
<parameter key="limit" value="10"/>
</operator>
<operator activated="true" class="extract_macro" compatibility="7.3.001" expanded="true" height="68" name="Extract Macro" width="90" x="179" y="34">
<parameter key="macro" value="rows"/>
<list key="additional_macros"/>
</operator>
<operator activated="true" class="loop" compatibility="7.3.001" expanded="true" height="82" name="Loop" width="90" x="313" y="34">
<parameter key="set_iteration_macro" value="true"/>
<parameter key="iterations" value="%{rows}"/>
<process expanded="true">
<operator activated="true" class="filter_example_range" compatibility="7.3.001" expanded="true" height="82" name="Filter Example Range" width="90" x="45" y="34">
<parameter key="first_example" value="%{iteration}"/>
<parameter key="last_example" value="%{iteration}"/>
</operator>
<operator activated="true" class="select_attributes" compatibility="7.3.001" expanded="true" height="82" name="Select Attributes" width="90" x="179" y="34">
<parameter key="attribute_filter_type" value="single"/>
<parameter key="attribute" value="Text"/>
</operator>
<operator activated="true" class="nominal_to_text" compatibility="7.3.001" expanded="true" height="82" name="Nominal to Text" width="90" x="313" y="34"/>
<operator activated="true" class="store" compatibility="7.3.001" expanded="true" height="68" name="Store" width="90" x="447" y="34">
<parameter key="repository_entry" value="data/%{rows}_row_data"/>
</operator>
<operator activated="true" class="write_csv" compatibility="7.3.001" expanded="true" height="82" name="Write CSV" width="90" x="581" y="34">
<parameter key="csv_file" value="C:\Users\ThomasOtt\Desktop\%{iteration}_row_data.txt"/>
<parameter key="column_separator" value=","/>
</operator>
<connect from_port="input 1" to_op="Filter Example Range" to_port="example set input"/>
<connect from_op="Filter Example Range" from_port="example set output" to_op="Select Attributes" to_port="example set input"/>
<connect from_op="Select Attributes" from_port="example set output" to_op="Nominal to Text" to_port="example set input"/>
<connect from_op="Nominal to Text" from_port="example set output" to_op="Store" to_port="input"/>
<connect from_op="Store" from_port="through" to_op="Write CSV" to_port="input"/>
<connect from_op="Write CSV" from_port="through" to_port="output 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="source_input 2" spacing="0"/>
<portSpacing port="sink_output 1" spacing="0"/>
<portSpacing port="sink_output 2" spacing="0"/>
</process>
</operator>
<connect from_op="Search Twitter" from_port="output" to_op="Extract Macro" to_port="example set"/>
<connect from_op="Extract Macro" from_port="example set" to_op="Loop" to_port="input 1"/>
<connect from_op="Loop" from_port="output 1" 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>0