Hello everyone,
I am trying to connect to my local Oracle DB from python script in Rapidminer. It's throwing "Database Error" when I execute the process.
I have executed the same python file from my terminal and it works but it doesn't work inside Rapidminer.
This is the xml file:
<?xml version="1.0" encoding="UTF-8"?>
<process version="8.1.000">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="8.1.000" expanded="true" name="Process">
<parameter key="logverbosity" value="init"/>
<parameter key="random_seed" value="2001"/>
<parameter key="send_mail" value="never"/>
<parameter key="notification_email" value=""/>
<parameter key="process_duration_for_mail" value="30"/>
<parameter key="encoding" value="SYSTEM"/>
<process expanded="true">
<operator activated="true" class="python_scripting:execute_python" compatibility="7.4.000" expanded="true" height="68" name="Execute Python" width="90" x="246" y="136">
<parameter key="script" value="import pandas import cx_Oracle def rm_main(): con = cx_Oracle.connect("demo", "password", "XE") #"demo"- db user name #"password" - db user password #"XE" - data source name print("Database version:", con.version) return "/>
</operator>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
This is the error :
Error after I run the process
I have no clue why this error is occuring. If someone has succesfully connected to any database from python script in execute python you can share your thoughts on this. kindly help :smileyhappy: