-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elasticsearch connector documentation inconsistencies #12880
Comments
@fastcatch We'd love a pr to improve the documentation! Would you like to work on this? |
Sure. I can fix 2, 3 (if it's to be a doc-fix which I guess it is), and 5. I can give a go for 4 as well but I may be too much of a novice here on this. Shall I do a separate PR for each or one together? 1 should be a code fix I guess that I'd give a pass for now. I can also update the docs on the lowercase fieldname issue but honestly it's such a bummer that I'd rather see it solved. However, if you feel it's to take much longer to get sorted, I'll add the notice. |
thanks for bring this up, @fastcatch We are working in progress to fix the lowercase field name: 1, 2 seems like documentation issues, host actually refers to hostname of search node |
I may not be able to completely follow you; I understand that you propose this:
|
Hi @fastcatch
thank you for working on it :) |
@zhenxiao: I split 1 and 3 so that this thread should not blow up. I'll proceed with a PR to 2 and 4. I'll attempt a fix to 5 as well and then you can perhaps better understand what my problem is. |
@fastcatch |
I'm not sure but my first guess is that your Elastic may not be running on 127.0.0.1:9300. Can you confirm that it is available there? |
Yes, I am able to connect to ES on 127.0.0.1:9200 via 'elastic-search head' plugin. |
Hi @gurinderiitr seems like Presto could not connect to Elasticsearch |
This issue has been automatically marked as stale because it has not had any activity in the last 2 years. If you feel that this issue is important, just comment and the stale tag will be removed; otherwise it will be closed in 7 days. This is an attempt to ensure that our open issues remain valuable and relevant so that we can keep track of what needs to be done and prioritize the right things. |
While trying to connect Presto to an Elasticsearch index we have found a few errors / inconsistencies / rooms for improvement in the documentation (version 0.220 at this point). In some cases I believe they are actually bugs (i.e. the code needs fixing) but I'm new to this and not always positive.
In table definition files we have found that the
schemaName
is not optional. If not defined Presto fails to start with[...] java.lang.IllegalArgumentException: schemaName is null or empty [...]
. (Since there is a default definition section for this at the connector level and even that is supposedly optional I guess this is a bug.)The example table definition has a
hostAddress
property in it; the description below the table useshost
(and the running code also expectshost
). We first copy-pasted the example to fill in and couldn't understand for a while what might have gone wrong.When the
columns
are not defined (note: they are marked optional) Presto will start but queries on the table fail with 'Internal error'. (SELECT * ...
type queries as well asSHOW COLUMNS IN ...
query.) They work fine if columns are defined.Field descriptions are not really helpful, especially at Column Metadata. (Some of this may be because we have not been very deep in Elastic either, though.) It took us quite a while to figure what to use for
type
at table definition. TheJSONPath
is still a bit of a mystery to us (what is it for and how is it used). Also we found most of the column metadata to be required in practice in spite of being marked as optional.The
type
in the column definitions looks outright wrong: for example it requires to be defined asvarchar
for Elastic'sstring
. Maybe it is right, though, just the description is misleading?And last but not least: there is an open issue about the connector being able to process only all-lowercase Elastic field names at this point. It took us nearly a day to figure why Presto did not return rows for a table while properly reporting its size. (I.e.
SELECT COUNT(1) FROM table
reported 13407,SELECT COUNT(Id) FROM table
reportedNULL
and we knew that theId
field was filled in for each row...) I suggest the until this gets resolved there should be an emphasized note in the docs about it.The text was updated successfully, but these errors were encountered: