IBM / trino-event-stream

Stream events from trino to a kafka topic
Apache License 2.0
10 stars 15 forks source link

Be able to use environment variables in "event-listener.properties" #14

Open shawnzhu opened 3 years ago

shawnzhu commented 3 years ago

What happened

Trino itself supports injecting secrets into properties file via syntax like ${ENV:env_var_name}, but it looks like doesn't work for event-listener.properties.

Expectation

It can use environment variables in event-listener.properties via the same syntax :point_up:

shawnzhu commented 3 years ago

depends on https://github.com/trinodb/trino/issues/8245

electrum commented 3 years ago

Note that you can make this work today by using Bootstrap to initialize the event listener. This would allow you to utilize the Airlift config system which has nice features like validation, detection of unused properties, printing properties as startup, etc.

shawnzhu commented 3 years ago

@electrum Thanks for the suggestion! I will try to follow the example you pointed out from https://github.com/trinodb/trino/issues/8245#issuecomment-874280380