I am using Druid 0.16.
I have lookup defined, and it works fine during query time (SQL). I am trying to use lookup in ingestion spec.
According to documentation (http://druid.incubator.apache.org/docs/latest/misc/math-expr.html), lookup ii ingestion spec is possible. When i try the following
It results in error stating “Lookup [location_to_zone] not found”.
My question is, is it possible to use lookup during ingestion? If yes, is there any specific configuration to be done in lookup definition?
I think it is possible to use lookups during ingestion as well.
Can you post your complete ingestion spec?
Is it batch or streaming ingestion?
Does the lookup work at query time?
As far as I understand it, any lookups that work at query time should work at ingest time too. If that’s not the case it might be something we should look into. I’d start by double-checking the following,
The lookup is properly loadable and works at query time.
You still have druid.lookup.enableLookupSyncOnStartup = true (as is the default). This is important because otherwise, the lookup won’t be loaded when the ingestion engine initializes.
I jumped the gun quickly. Thanks for your reply.
After changing druid.lookup.enableLookupSyncOnStartup = true (default was false), the ingestion works fine.
does not work: lookup(cast(“DOLocationID” as string),‘location_to_zone’)
Is it not possible to pass nested transformations during lookup? Usecase is say “customer_id” is a column of type numeric. We want to ingest it as numeric (as we dont want to create indexes on these columns). But using lookup on this column we want to populate “first_name” for each “customer_id”. In such as case we have to use cast and then lookup.