image

🎉 🎉 RAPIDMINER 9.10 IS OUT!!! 🎉🎉

Download the latest version helping analytics teams accelerate time-to-value for streaming and IIOT use cases.

CLICK HERE TO DOWNLOAD

"Solved - Adding database connection to Rapid Analytics"

spoortispoorti Member Posts: 24 Contributor II
edited June 2019 in Help
There are pre-defined drivers in RapidAnalytics like MySql and some more.

I am trying to connect to Vertica database.
I copied the jdbc driver to ../server/default/lib
Created "vertica-ds.xml" in ../server/default/deploy/ with changes for vertica

How do I use this connection into 'Read Database' Operator.
Works just fine with RapidMiner with 'Manage Database connections' and 'Manage Database drivers'

http://rapid-i.com/rapidforum/index.php?topic=4437.0
This post suggested the above. But how do I use the JNDI name in 'Read Database' operatot ?

UPDATE

I chose 'jndi' as 'define connection'
'jndi name' = VerticaDS
I
started the rapidMiner as
java -Xmx2000m  -Djava.naming.factory.initial=VerticaDS -jar rapidminer.jar &

I get an error like this
"Cannot create example set meta data: Failed to lookup 'VerticaDS': javax.naming.NoInitialContextException: Cannot instantiate class: VerticaDS [Root exception is java.lang.ClassNotFoundException: VerticaDS]."

I do see  the following line in boot.log at the startup of RA server
INFO  [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=VerticaDS' to JNDI name 'VerticaDS'


Tagged:

Answers

  • spoortispoorti Member Posts: 24 Contributor II
    Any help is really appreciated. I am not able to go any further without this. Thanks
  • fischerfischer Member Posts: 439  Maven
    Hi,

    maybe jdbc/VerticaDS is the correct JNDI name?

    Best,
    Simon
  • spoortispoorti Member Posts: 24 Contributor II
    Here is the transript from boot.log
    16:22:28,617 INFO  [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=VerticaDS' to JNDI name 'VerticaDS'

    This is the error when I use it in 'Read Database' this
    Cannot create example set meta data: Failed to lookup 'jdbc/VerticaDS': javax.naming.NoInitialContextException: Cannot instantiate class: jdbc/VerticaDS [Root exception is java.lang.ClassNotFoundException: jdbc/VerticaDS].
  • fischerfischer Member Posts: 439  Maven
    Hi,

    ok, this is the somewhat uncomfortable answer: After you added your database driver in RM, go to your .RapidMiner5 folder and look for a file called "jdbc_properties.xml". Copy the fragement that was added for your database.

    Locate the RapidMiner-X.ear in your RapidAnalytics installation under server/default/deploy. It is a regular ZIP archive. If you have a tool that lets you edit files in zips in zips (such as the midnight commander :-)), open it and go to lib/RapidMiner.jar. This is a ZIP file again. Therein, go to com/rapidminer/resources and edit the jdbc_properties.xml file you find there. Paste the XML fragment you copied.

    Now, when you restart RA, you will be able to add database connections of the new type through the Web interface.

    Yes, I know you want to be able to edit that on the Web interface :-)

    Best,
    Simon
  • spoortispoorti Member Posts: 24 Contributor II
    Thanks Simon for the specifics. I was able to add the database connection to Vertica via web interface.
Sign In or Register to comment.