"Write files to database"

deepminer
deepminer New Altair Community Member
edited November 5 in Community Q&A
Hi!

I have a short question - how is it possible to write text file from rapidminer to MySQL database line by line? I tried to use node "Document to data", but it stores all text in one cell.

Thanks for attention and sorry for bad english.

Answers

  • haddock
    haddock New Altair Community Member
    Hi,

    and I have a short answer - use 'read CSV', like this!
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.2.003">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.2.003" expanded="true" name="Process">
        <process expanded="true" height="198" width="522">
          <operator activated="true" class="read_csv" compatibility="5.2.003" expanded="true" height="60" name="Read CSV" width="90" x="80" y="20">
            <parameter key="csv_file" value="/home/cjfpainter/deviceQuery.txt"/>
            <parameter key="column_separators" value="\n"/>
            <parameter key="trim_lines" value="true"/>
            <parameter key="use_quotes" value="false"/>
            <parameter key="parse_numbers" value="false"/>
            <parameter key="first_row_as_names" value="false"/>
            <list key="annotations"/>
            <list key="data_set_meta_data_information"/>
          </operator>
          <connect from_op="Read CSV" from_port="output" 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>
    Good luck..