Re: [druid-user] StringFirst/StringLast aggregator result to OTHER column type

I think this is tricky (unfortunately). I tried using a druid SQL query with SUBSTR(), feeding it in values based on STRPOS(), but SUBSTR expects literals for the position argument, and doesn’t accept a function based on values in the row. If you’re using native queries, you might be able to use a javascript aggregator, if that functionality is enabled.

Another sql option might be to ingest as a multivalue dimension, then use MV functions (MV_OFFSET_OF and MV_SLICE) to locate and extract the entry.