Querying hive from metabase using sparksql


#1

My requirement is to querying hive from metabase using sparksql, I have tried below user guide
Working with SparkSQL in Metabase
(https://www.metabase.com/docs/latest/administration-guide/databases/spark.html)
but unable to see sparksql under database selection dropdown. Not getting any error as well.
Highly appreciate if any one can help on this.
Metabase version v0.31.2 (jar file)
connector jar : https://s3.amazonaws.com/sparksql-deps/metabase-sparksql-deps-1.2.1.spark2-standalone.jar


#2

Hi @akila
It sounds like the plugin is not being loaded. Please check your log file, when Metabase is started to see if it references the plugin.
You should see something like this: INFO metabase.plugins :: Loading plugins
Also see this: https://github.com/metabase/metabase/issues/7528#issuecomment-388455442


#3

thank you very much for the immediate respond.


#4

Hi flamber,

Seems like metabase not referring the plugin. Still can’t figure out what I need to do.

apps]# java -cp metabase.jar:plugins/* metabase.core
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/brandixadmin/sw/apps/metabase.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/brandixadmin/sw/apps/plugins/metabase-sparksql-deps-1.2.1.spark2-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

Can we fix this issue above?
My second option is to build the spark driver jar from the source, in that case do I need to create both metabase and spark driver jar or spark driver jar only?

Highly appreciate if you can help on this…

Regards,
Akila


#5

@akila
I have zero knowledge about Spark - I’ve just seen questions multiple times.
Which Java version are you using? I would guess that you need to build your own and add an exclusion - I would guess you only need to build one of them.


#6

Thanks a lot flamber


#7

Hi flamber,
I was able to successfully query hive after building spark sql plugin in my local. Thanks a lot for your help.