Uh oh!
There was an error while loading. Please reload this page.
Add an Elasticsearch interpreter - #520
Conversation
There was a problem hiding this comment.
maybe filter the returned list base on what's in s? like if the user is typing s it should return search?
There was a problem hiding this comment.
it looks like you have taken out completion? I think it's still worthwhile to have some of it..
felixcheung
commented
Dec 7, 2015
very cool - I don't have es to test it but only a few comments. |
There was a problem hiding this comment.
Would you be willing to remove that information from the comments, please?
It is not strictly documented yet, but Zeppelin so far, as many other ASF projects (Hadoop, Zookeeper, Avro, etc), do not encourage use of @author tags.
We definitely want and keep contributors credits, but we use git, JIRA and mailing list history, so nothing will be lost.
There was a problem hiding this comment.
I have removed the author tag.
bzz
commented
Dec 8, 2015
👍 for docs and tests! I might be wrong, but because all interpreters right now are part of the Zeppelin releases, in my understanding we also need to document the licence of the dependencies (and it's transitive dependencies) in the @bbonnin would you care of doing it in this PR please? Here is how the list of dependencies looks like now |
jeffsteinmetz
commented
Dec 8, 2015
I love the idea of making elasticsearch a first class cititen to Zeppelin. I was curious however, as you build out the query language, eventually it will get to the point that you'll want to add more features to keep in parity with elasticsearch's existing "extensive" query dsl. I've built some scala libraries that wrap ES for usage in API, spark utilities and other business logic. Eventually the wrapper even starts to try to mimic some of the ES query language. Curious if there has been any considerations made as to why you might not just pass through existing ES json using the existing query language? The ease of use is certainly welcome though. So I was curious about the long term plans for the DSL in the interpreter. Using the native spark integration provided by Elasticsearch Hadoop after an
or a Map
Elasticsearch Hadoop (spark) can also create a dataframe using the elasticsearch spark sql context. Curious if there has been any thought around how the elasticsearch interpreter / pipeline could be a bit more spark, ES native and ES hadoop native friendly. As a side note, I import this library, https://github.com/sksamuel/elastic4s when I want to simplify my Elastic Search query experience ( this DSL misses out on a few functional builder patterns and recent features, but does cover about 80% of most use cases): |
felixcheung
commented
Dec 8, 2015
@jeffsteinmetz has a good point about ES Query DSL. I'm not sure we should require Spark for ES though. Thought? |
jeffsteinmetz
commented
Dec 8, 2015
Things also get interesting when you return Json with nested objects and try to treat them like a flat relational database response (shown in the example pie charts and sql like table response examples in this PR). I believe the idea behind this PR is to return the raw Elasticsearch Json, and potentially graph it or put it into tables? Admittedly, I've only passed over this PR with a quick scan of your source. Happy to dig into it more over time. ES-hadoop (native spark) has been working toward getting a variety of json use cases working with dataframes. It is a problem being worked on in es-hadoop, that's fairly complex. I.e. how would it handle this? |
jeffsteinmetz
commented
Dec 8, 2015
Regarding the DSL, I see you can pass any Json Elastic query to the elasticsearch interpreters How do people feel about letting users |
bbonnin
commented
Dec 8, 2015
Thanks to all for your comments! About the DSL, my goal was not reinvent the wheel, but just provide a simple way to access Elasticsearch. The main problem is how to handle the json documents returned by Elasticsearch. {
"field1": "value1",
"field2": {
"field3":"value3",
"field4":[1,3]
}
}You will get a something like this:
I will fix the code in this way, are you ok ? Bruno |
jeffsteinmetz
commented
Dec 8, 2015
Nice!. That makes sense regarding field flattening. thank you for the follow up. Still curious about how the community feels about Zeppelin being a CRUD tool (mainly allowing Deletes). |
jeffsteinmetz
commented
Dec 8, 2015
One more thing I thought of as a use case - how would it handle Shield security? |
bbonnin
commented
Dec 8, 2015
@bzz For the licence file, is there an easy way to complete this file ? Somethig like "mvn license:put-the third-party-licences-in-a-file" ? |
bbonnin
commented
Dec 8, 2015
For shield, we have to deploy the interpreter with the shield jar. For the configuration, just add the property "shield.user" in the interpreter configuration panel. |
felixcheung
commented
Dec 8, 2015
@jeffsteinmetz re: CRUD - in general we seem to be pretty open about it. For example, in the Hive interpreter a user could drop a table. Hive would have access control. ES has access control too, couldn't we rely on that? https://www.elastic.co/guide/en/found/current/access-control.html#_managing_access_control?q=access cob @bbonnin could we add your approach to flatten JSON and shield information to the doc? |
bzz
commented
Dec 9, 2015
@bbonnin sorry but I'm not aware of such automated solution. There might be, but at least for my changesets I did that manually, reviewing each licence not to be apache-un-compatible |
felixcheung
commented
Dec 11, 2015
otherwise looks good, thanks! |
bbonnin
commented
Dec 17, 2015
In the last commit, I have added the possibility to search by just providingthe content of a quey_string. I think it's simpler and based on Lucene query syntax. |
bzz
commented
Dec 19, 2015
@bbonnin Great! Merging latest master in should fix the CI. |
bbonnin
commented
Dec 19, 2015
@bzz I have checked LICENCE file, and I have seen that no duplicates, except for some components that have differents versions (for example, there are 2 versions of joda-time, I have added one). |
bzz
commented
Dec 21, 2015
This is a good question boiling down how the build system resolve such conflicts at the build time, but that's our of scope of this PR I suppose. As for LICENCE issue - I think we need to list transitive dependencies too, but if library does not change licence in a new version - it should be fine to have one line per dependency group\artifact. |
bbonnin
commented
Dec 21, 2015
For LICENCE issue, I have removed the library references that already exist with the same grouId/artifactId, if they have a different version and the same licence. |
bzz
commented
Dec 22, 2015
Looks great to me, will merge if there are no more discussions. |
Elasticsearch Interpreter
Interpreter for querying ElasticSearch .
Supported requests are "get document by id" , "search documents" , "delete by id" , "count documents" and "index / update a document".
Supported versions of Elasticsearch : >= 2.1