Im using elasticsearch input plugin to obtain info from elastic, with this extracted info i use the JDBC streaming plugin to get information from BD with some fields that i extracted from elastic.
The problem that I have is that the statement to execute changes depending on the value that i extract from Elastic.
Is there any way to define a variable statement either through a variable that takes a value according to some condition?
For example, if I extract from elastic the variable A with value B
the query would be
SELECT * FROM
TABLE Y WHERE NAME = 'B'
On the other hand, if I extract the variable B with value C, the query would be
SELECT * FROM TABLE Z,Y WHERE CITY = 'C'