-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Druid Lookups introspect keys and values endpoints do not return valid JSON #17361
Comments
Hi @teyeheimans, Map Lookup
I do see the key-value pairs, keys and values correctly, and formatted as a JSON
cachedNamespace Lookup
I see all the endpoints returning responses:
Thanks! |
I am using a map lookup, just like you. Your example shows the problem already:
The values returned in your example is NOT valid JSON. The values are not quoted. The correct response would be:
Also, to check if it is valid JSON you could use
This also happens when the keys are strings. So the Finally, the |
@teyeheimans, that does look like a bug. This is the relevant introspection code for map lookups: https://github.com/apache/druid/blob/master/server/src/main/java/org/apache/druid/query/lookup/MapLookupExtractorFactory.java#L156. I think |
Btw, you can directly query a map lookup in SQL: |
Hi @abhishekrb19, For the
|
I agree on what you describe. However, I am not familiar with the java-side of druid. We have created an PHP client for druid, see https://github.com/level23/druid-client. Recently I have integrated support for lookup management. There I found out that the response of the Also, I find it strange that it is not possible to specify for all different types of lookups if the data is |
Description
While analyzing the Lookup features of druid, I noticed that the keys and values endpoints for lookups do not return valid JSON.
https://druid.apache.org/docs/latest/querying/lookups#introspect-a-lookup
Example response:
"[20416, 20404, 20415, 02F440, 02F461, 20420, 02F402, 02F480, 20408, 20409, 20410, 20412, 20402, 02F421, 02F420, 20601, 02F601, 02F620, VODAFONE, CLARO]
It seems that all keys or values are just joined with
,
and wrapped between two square brackets.Finally, the documentation seems incorrect on this page:
https://druid.apache.org/docs/latest/querying/lookups-cached-global/#introspection
It states:
However,
/version
does not seem to work and returns an 404.Motivation
For as far as I know, all API endpoints return valid JSON. However, the introspect keys and values do not. This is incorrect in my opinion.
The text was updated successfully, but these errors were encountered: