Having environment variable in SQL file is not working

Hi,

I've tried below things but 1st one is working and the 2nd one is failing.

In command line i did "export SCHEMANAME=TEST "

1st One: Worked
Conf file
Plugin: JDBC
statement=> "select * from ${SCHEMANAME}.TABLE1 "

2nd One: Failed
Instead of having the sql directly in conf file, I copied the above sql and kept in the file called test.sql.
Now my test.sql will be having below line.
select * from ${SCHEMANAME}.TABLE
Conf file:
statement_filepath => "/logstash/test.sql"
##Below line is commented
#statement=> "select * from ${SCHEMANAME}.TABLE1 "

Does this supported ? Or Is there any other way to achieve this?

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