The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
"Solved - Adding database connection to Rapid Analytics"
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'
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'
0
Answers
maybe jdbc/VerticaDS is the correct JNDI name?
Best,
Simon
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].
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