superset icon indicating copy to clipboard operation
superset copied to clipboard

Spark SQL backend (to support Elasticsearch, Cassandra, etc)

Open sscarduzio opened this issue 10 years ago • 50 comments

I can't resist saying Caravel looks much neater than Kibana, plus the user management doesn't cost money and it's not an afterthought. It would be amazing to see Caravel replacing my Kibana dashboard, using the data I've got currently in Elasticsearch.

You use an SQL interface to query the data store, is there any chance Caravel can speak to Elasticsearch through Spark SQL? Spark has a mature Elasticsearch connector, so it should be OK.

And wait.. If you support Spark SQL, you'll be immediately able to support HDFS, Cassandra, HBase, Hive, Tachyon, and any Hadoop data source!

Is this a path worth exploring for this project? I think it's quite exciting.

sscarduzio avatar Apr 02 '16 10:04 sscarduzio

+1 I'm looking for Apache Drill connector, as well

gbrian avatar Apr 02 '16 13:04 gbrian

+1 on this feature too

ariepratama avatar Apr 02 '16 14:04 ariepratama

Totally worth doing, there's 2 paths for it, either by creating a SqlAlchemy dialect (might not be possible is Spark SQL is funky), or creating a new datasource and implementing the query interface. For now we have 2 datasources: sqlalchemy or druid. It's totally doable to add a third one, it just needs to implement something like: https://github.com/airbnb/caravel/blob/master/caravel/models.py#L460

Basically you need to receive these parameters and return a pandas dataframe.

mistercrunch avatar Apr 02 '16 17:04 mistercrunch

We use Spark at Airbnb and have some SparkSql in places, we might have use cases for it internally, but I'm not sure where it fits in the priority list.

mistercrunch avatar Apr 02 '16 17:04 mistercrunch

Cool thanks for the pointers! This new connector would surely unlock a wealth of valuable contributions from other businesses which happen to not use Druid or a plain RDBMS.

Sounds like a good investment to me :)

sscarduzio avatar Apr 03 '16 11:04 sscarduzio

I am really interested in adding Hive support, I may take a crack at it sometime in the next few weeks. Dropbox has a Python/Hive project that I was looking at: https://github.com/dropbox/PyHive

joshwalters avatar Apr 06 '16 17:04 joshwalters

Does it means Impala as well? Thanks

gbrian avatar Apr 06 '16 18:04 gbrian

+1

guang avatar Apr 07 '16 01:04 guang

+1 for Hive

csalperwyck avatar Apr 11 '16 08:04 csalperwyck

@gbrian Yes, the package I am looking at would add support for Hive and Impala. I opened an issue to track this: https://github.com/airbnb/caravel/issues/339

joshwalters avatar Apr 13 '16 18:04 joshwalters

Great work guys, but can I load data from Elasticsearch?

OElesin avatar Apr 23 '16 06:04 OElesin

+1 to addition of Elasticsearch support.

rahulgagrani avatar Apr 23 '16 19:04 rahulgagrani

+1

philippfrenzel avatar Apr 23 '16 19:04 philippfrenzel

+1

povilasb avatar Apr 27 '16 05:04 povilasb

+1 for Hive

nabilblk avatar May 06 '16 09:05 nabilblk

+1 for Hive and Elasticsearch

bwboy avatar May 11 '16 08:05 bwboy

I am working on an Apache Drill Sql Alchemy Dialect. I have some basic things working, and have been working with others on the Drill mailing list. There has been talk of plugging Drill to Elastic Search, which seems a bit convoluted, however, since Elasticsearch doesn't have a SQL interface, Drill works really nice, if we get a Dialect working for Drill, then other storage plugins will (hopefully) just work. Some of the work can be found here:

Docker container with pyodbc, unixodbc, Drill ODBC, and caravel all working:

https://github.com/JohnOmernik/caraveldrill

Drill Dialect (work in progress, feel free to play with it and try it, please report issues as you find them, this is iterative brute force programming at this point!) https://github.com/JohnOmernik/sqlalchemy-drill

JohnOmernik avatar May 20 '16 00:05 JohnOmernik

I've taken a different approach and started a native backend.

WIP is at https://github.com/sathieu/caravel/tree/elasticsearch (beware: I'll squash commits and force push).

Not much is working yet, and I don't have dedicated time on it. We'll see what comes.

sathieu avatar Jun 01 '16 02:06 sathieu

+1 to sparksql

tninja avatar Jun 01 '16 19:06 tninja

For what is worth: spark 2 will be sql compliant so then a sqlalchemy dialect is feasible

bolkedebruin avatar Jun 10 '16 07:06 bolkedebruin