How to write sub query in esql

Hi,

I am trying to get results from alias index  (alias_index1_index2 = index1 and index2) if values of two columns from different indexes matches. Looks like joins or sub queries are not support ed completely. Could any one tried or let me know how to achieve .

Query:
SELECT col1, col2 FROM alias_index1_index2 WHERE col2 IS NOT NULL AND timestamp < NOW() AND timestamp > NOW() - INTERVAL 30 MINUTE AND col1 = col2 
Error:
  [essql] > Unexpected error from Elasticsearch: [sql_illegal_argument_exception] Line 1:232: Comparisons against variables are not (currently) supported; 
Thanks,
Areddy

Indeed col1 = col2 is not currently supported.
Joins are not supported currently either and currently there is only limited support for subqueries.

I don't see a workaround for your case.

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