connecting spagobi to cosmos - fiware

I'm trying to connect SpagoBI to Cosmos via Hive JDBC driver.
The connection works but I need to add jar (json-serde-1.3.1-SNAPSHOT-jar-with-dependencies.jar) to be able to execute map reduce when querying.
The problem is that spago bi doesn't support multiple queries for the definition of a dataset and therefore I cannot add the jar before executing the actual select (the semicolon is interpreted as part of the path of the jar)
How can I do?
Is there a way to definitely add the jar so I don't have to add it again every time I query hive?
Is this the recommended way to access cosmos data from spagobi or is there a different one i'm not aware of?
Thanks!

You can try this approach: configuring the ADD JAR statement within the connection to the datasource. Have a look at
https://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html
Look at connectionInitSqls: you can put the ADD JAR statement there.
Of course this means that you have to configure the connection as a JNDI resource (that is the recommended configuration indeed).
Hope this helps

Related

Squirrel: UnityJDBC throwing ClassNotFoundException

I've using Squirrel SQL 3.6.
I have working connections to two databases, which I'll call A and B. I can run queries against A and B without issues. They've been setup and working for a couple years.
I'm needing to run queries against both of these datasources/connections and have Squirrel handle the joins between them.
I've got the UnityJDBC driver added. I've created a connection using same. The next step is to add A and B to it, such that I can run queries across them.
I open the connection, right-click and select "(Virtualization) Add Source" and select A from the list, then tell it to "Add." I don't add any other properties.
It tells me:
Preparing to add data source...
ClassNotFoundException for Driver: com.ibm.as400.access.AS400JDBCDriver
Make sure driver is in your classpath.
If that driver wasn't in the classpath, I'm assuming I wouldn't be able to use connection A at all. Which leads me to believe UnityJDBC has another classpath all its own. Any suggestions on what that would be, where to find it, how to fix this, etc?
As said in this instruction http://www.unityjdbc.com/squirrel/MultiSourceVirtualizationPlugin_install.pdf :
Make sure to add other database JDBC jars into the squirrel/lib folder
or JRE classpath. The plugin cannot access drivers in custom
classpaths used by SQuirreL.
Hope it's not too late and helps ;)

mysql configuration for kafka web console

working on web console configuration for kafka which internally uses play framework. I am trying to use mysql configuration with below library
https://github.com/claudemamo/kafka-web-console
But this library is expecting zookeepers table in mysql database(checked with default h2 database also).
I didn't find any documentation regarding database/table creation in library documentation.
Do i need to create this table or need to find default zookeepers table for zookeeper service and configure to that.?
You need to create the Zookeepers table in addition to a few other tables (e.g., status). However, Play! can take care of that. Launch the console and access the application page. Play! will ask you if you want to apply a no. of evolutions. Give it permission so that it can create the necessary tables. Make sure you change conf/application.conf so that the console connects to your MySql database.

meteor reporting of data in existing mysql db. how?

I'm trying to make some reports using meteor and raphael js. I have to report data from an existing MySQL database. I do not wish to write to that database. I need only the "R" from CRUD.
I have thought of various manual ways of: exporting .csv files from the MySQL db via the application itself (Limesurvey) and using mongoimport to populate a MongoDB collection, and then do my CollectionName.find() etc in Meteor.
or perhaps some way of exposing REST full endpoints only to consume data, and use the http package for Meteor.
Is there a good clean solution for using existing SQL data in a Meteor JS application?
How can one use pre-existing SQL data?
(I've no problem with duplication in MongoDB, mind you. however it has to be...)
Thank You
You can do it without any duplication completely from inside Meteor, but you will have to jump through a couple of hoops.
Firstly, use the mysql npm package to query the SQL database. Though Meteor provides Npm to require node packages, I find that using meteor-npm is an easier. Then to do the "R"eading form MySQL, create a Meteor.method on your server which queries the MySQL directly.
Then the second problem is that the mysql package is completely asynchronous. Hence, the execution of the SQL query returns value in a call back and by that point, your Meteor.method call would return leaving the client with an undefined. To fix that issue, we can use Future.
There are a couple of ways of smoothing over this step:
Using `meteor-sync-methods
Spinning out your own version from advice from the issue to allow this natively
Use this easy to implement one-time pattern: "fence has already activated -- too late to add writes"
Hope that helps.

serverError:class javax.faces.el.EvaluationException could not execute query

I am getting this error from host server. I am using mysql database,tomcat and hibernate orm tool.
How can I solve this problem? Can you help me please?
I was having this problem too.
You should take a look if there's object that is not initialized, then you shoul see if the tables are specified correctly (this is more common if you develop in Windows and deploy in Linux or vice-versa).
For mote details take a look here:
Manager Bean do not returns when the project is online

Migrate Grail's HSQLDB embedded database

how to migrate Grail's HSQLDB embedded database(That contains my App's Data that I don't want to lose) into external one, such as MySQL or ApacheDerby?
If your data isn't important just let hibernate regenerate your schema, else try this: http://www.grails.org/plugin/liquibase
The MySQL Migration Toolkit may be exactly what you need.
A little searching turned up this article that shows examples of what the GUI Tool looks like.
I haven't had to migrate data from a HSQLDB to any other DB, but if I had data that I didn't want to use in a HSQLDB then I'd definitely try this method.
You are going to want to backup the
HSQLDB database that you want to save
(I'm assuming you used a file DB
rather than an in-memory one right?)
Change your DataSource to a MySQL
datasource with the dbCreate set to
update (or something non-destructive)
Run the Migration Toolkit and migrate
your data
Otherwise you ought to be able to view the data in your DB by using another tool (DBVisualizer, RazorDB, or others) and they might be able to help you export the data.
Because grails uses hibernate underneath, no migration is necessary. All you need to do is repoint your conf\DataSources.groovy to the new database, and next time you startup, it will create tables in the new DB.
See section 3.3 in this doc for more information on MySQL config.