Filterrows using a subquery

Hello,

I'm trying to filter the result of a query using a subquery. Since elastic sql does not support it, I'm trying to do this using a canvas function. Is this possible using canvas function? Is there any other way?

Here is an example of what I have:

filters
| essql query="SELECT id, name, catalog_id FROM \"item_index*\" order by @timestamp\"" 
| filterrows fn={getCell "catalog_id" | eq 1} 

Working but I want to replace the hardcoded 1 with a query.

What I tried but not working:

filters
| essql 
  query="SELECT id, name, catalog_id FROM \"item_index*\" order by \"@timestamp\""  
| filterrows fn={getCell "catalog_id" | eq {essql query= "Select catalog_id FROM \"catalog_index*\" 
 Order by "@timestamp" desc LIMIT 1} }

Thanks in advance.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.