connecting spagobi to cosmos

2019-08-15 03:04发布

问题:

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!

回答1:

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