Need a special offer?Find out if your project fits.
+

Flexmonster to Apache Drill Connection - Not able to choose a schema

Answered
Vidyasagar Gudapati asked on June 15, 2017

Hello,

Am trying to connect flex monster with Apache Drill. Where am not able to choose any schema. Below is the snippet am using and trying to escape the default delimiter " ; " to choose schema. 

CONNECTION_STRING=Jdbc=jdbc:drill:zk=10.10.6.4:2181/drill/TeleDynamicxDrillCluster\;schema=hive;
JDBC_DRIVER_JAR=./drill-jdbc-all-1.9.0.jar
JDBC_DRIVER_CLASS=org.apache.drill.jdbc.Driver
CATALOGS_PATH=./
PORT=50007
CACHE_ENABLED=FALSE

Any help will be much appreciated. 

Thanks,
Vidy
 

11 answers

Public
Ian Sadovy Ian Sadovy Flexmonster June 16, 2017

Hello Vidy,
 
Thank you for the question.
As I understood, you are trying to use Flexmonster Mondrian Accelerator to connect with Apache Drill.
In such case, you should have a Mondrian Schema XML file (i.e. hive.xml).
So, the schema should be specified on the client side (in JS code) using catalog parameter as following:

var pivot = $("#pivotContainer").flexmonster({
	report: {
		dataSource: {
			dataSourceType: "mondrian",
			/* URL to the Accelerator */
			proxyUrl: "http://localhost:50006",	
			/* Catalog name / Mondrian schema */
			catalog: "hive",
			/* Cube name */
			cube: "Sales",
			// Flag to use Accelerator
			binary: true
		}
	},
	licenseKey: "XXXX-XXXX-XXXX-XXXX-XXXX"
});

Please let me know if it works.
 
Regards,
Ian

Public
Vidyasagar Gudapati June 16, 2017

Hello Ian, 
Thanks for your response. That doesn't solve my issue. 
Later to this post, I had a chance to take a closer look at the issue. And what I found is, under flex monster proxy server mondrian Jar, there's a package called like this:
com.flexmonster.proxy.utils
Under that you have a class named, ConnectionStringBuilder.class which is a java file. Where you guys have specified ";" as delimiter, can you or your team rebuild the code with different delimiter may be "|" or something like that.?
Once you have rebuild the Jar, please provide it to us. 
 
Thanks,
Vidy

Public
Ian Sadovy Ian Sadovy Flexmonster June 16, 2017

Vidy,
 
Could you please specify what version of Flexmonster you are currently using?
Have you tried the latest version available?
We have already made the similar fix in the 2.316 update for ConnectionStringBuilder .
So ; delimiter should work without escaping.
For example: CONNECTION_STRING=Jdbc=jdbc:drill:zk=10.10.6.4:2181/drill/TeleDynamicxDrillCluster;schema=hive;
 
Looking forward to your feedback.
 
Regards,
Ian

Public
Vidyasagar Gudapati June 16, 2017

Hi Ian, 
 
I've tried that and it won't work. Because delimiter ";" will be treated as end of statement and we need to schema=hive in JDBC Connection URL. 
 
Which is why, am mentioning, we need a change delimiter from ";" to something new special character. 
 
Looking forward to hear from you.
 
Best Regards,
Vidy

Public
Ian Sadovy Ian Sadovy Flexmonster June 16, 2017

Thank you for the details.
It is clear now. Our dev team need some time to take a closer look at this issue and I will update you soon.
Does it work for you?
 
Regards,
Ian

Public
Vidyasagar Gudapati June 16, 2017

Hello Ian,
 
I actually unpacked the JAR and it seems it is an ANT project, i converted all the classes to JAVA file, I changed the code too. 
 
Am facing the build issues. 
 
Nevertheless, Please get back to us ASAP as we're inches away to Production and We're looking to deploy ASAP. 
 
Have a great weekend! 
 
Best Regards,
Vidy

Public
Ian Sadovy Ian Sadovy Flexmonster June 19, 2017

Hello Vidy,
 
Thank you for giving us some time.
We have added a new parameter JDBC_DELIMITER that can be used as follows to replace ;:

CONNECTION_STRING=Jdbc=jdbc:drill:zk=10.10.6.4:2181/drill/TeleDynamicxDrillCluster|schema=hive;
JDBC_DELIMITER=|

Please download an update and let us know if it works for you - https://s3.amazonaws.com/flexmonster/teledynamicx/FLEXMONSTER-2017-TELEDYNAMICX-JUN19.zip
Looking forward to your feedback.
 
Regards,
Ian

Public
Vidyasagar Gudapati June 19, 2017

Hello Ian,
 
Thanks for your quick fix. I'll download, test this and get back to you. 
 
Best Regards,
Vidy

Public
Vidyasagar Gudapati June 20, 2017

Hello Ian,
 
Build works great. Thanks for quick help. 
 
Kudos to Flexmonster team! 
 
Best Regards,
Vidy

Public
Vidyasagar Gudapati October 6, 2017

Hello Ian Sadovy,
Can you please provide us the 2.4 version of jar with above mentioned changes? 
Looking forward to hear from you. 
Best Regards,
Vidy
 

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster October 10, 2017

Hello Vidy,
Thank you for writing. All the changes are already available in the latest 2.4 version. You are welcome to download it from our website. 
Regards,
Dmytro.

Please login or Register to Submit Answer