🦉 🎤   RapidMiner Wisdom 2020 - CALL FOR SPEAKERS   🦉 🎤

We are inviting all community members to submit proposals to speak at Wisdom 2020 in Boston.


Whether it's a cool RapidMiner trick or a use case implementation, we want to see what you have.
Form link is below and deadline for submissions is November 15. See you in Boston!

CLICK HERE TO GO TO ENTRY FORM

"Stream Database operator - failure (SQL Server 2005)"

PetersPeters Member Posts: 2 Contributor I
edited May 23 in Help
Hello,

I tried to connect to my SQL Server 2005 database with the Stream Database operator. The table is quite small with 100 datasets (the original purpose was to use this operator on very large tables) . I added an integer-key RM_Index just as it said in the description.
The connection works, but i get the following "Process Failed" message:

Database error occurred: Incorrect syntac near the keyword 'AS'. The JDBC driver has thrown ...

My Process as XML:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.1.006">
 <context>
   <input/>
   <output/>
   <macros/>
 </context>
 <operator activated="true" class="process" compatibility="5.1.006" expanded="true" name="Process">
   <process expanded="true" height="564" width="332">
     <operator activated="true" class="stream_database" compatibility="5.1.006" expanded="true" height="60" name="Stream Database" width="90" x="45" y="30">
       <parameter key="connection" value="SQL_Server"/>
       <parameter key="table_name" value="tablename"/>
     </operator>
     <connect from_op="Stream Database" 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>
My latest Log entry:

Jun 24, 2011 2:23:53 PM INFO: No filename given for result file, using stdout for logging results!
Jun 24, 2011 2:23:53 PM INFO: Loading initial data.
Jun 24, 2011 2:23:53 PM INFO: Process //NewLocalRepository/Stream_Test starts
Jun 24, 2011 2:23:53 PM CONFIG: Connecting to jdbc:jtds:sqlserver://localhost:1433/databasename as username.
Jun 24, 2011 2:23:53 PM INFO: Stream Database: Primary key 'RM_Index' found: creating a new mapping table 'RM_MAPPING_tablename' which maps from the RapidMiner index 'RM_INDEX' to the primary key. This might take some time...
Jun 24, 2011 2:23:53 PM SEVERE: Process failed: Database error occurred: Incorrect syntax near the keyword 'AS'.
Jun 24, 2011 2:23:53 PM SEVERE: Here:           Process[1] (Process)
          subprocess 'Main Process'
      ==>   +- Stream Database[1] (Stream Database)
I would be glad if someone could help since it concers my bachelor thesis.


Greetings,

Peter
Tagged:

Answers

  • Marco_BoeckMarco_Boeck Team Lead Software Engineering Administrator, Moderator, Employee, Member, University Professor Posts: 1,810   RM Engineering
    Hi,

    to be honest I don't know why it's not working for you, it's working for me..
    Maybe try to manually set the id_attribute on the stream database operator to your id column.

    Regards,
    Marco
  • PetersPeters Member Posts: 2 Contributor I
    Hi Marco,

    thank you for your answer. I don't know how to change the id attribute manually. The only parameters for my Stream Database operator are: "define connection", "connection", "table name" and "label attribute". Is there another way to change this (besides to check and understand any java-code)?

    Strangely, the Error-Message-Box changed now (still same settings as before) to:
    " Database error occured: Incorrect syntax near 'AUTO_INCREAMENT'..."
    Maybe this helps.

    My conclusion was, that either I am doing something wrong, or RapidMiner doesnt work well with Microsoft SQL Server 2005 on the Stream Database operator. I was hoping for the first  ;).

    Greetings,
    Peter
  • IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,661  RM Founder
    Hi Peter,

    the good old stream database operator - causing a lot of headache...

    Actually, the operator only works really well out of the box for mySQL or Oracle. In most other cases, you can make it work by providing an integer column in your table called "RM_INDEX". And sometimes even that does not help. Not sure about MS SQL though...

    Cheers,
    Ingo
    RapidMiner Wisdom 2020
    February 11th and 12th 2020 in Boston, MA, USA

Sign In or Register to comment.