scriptella/scriptella-etl

Velocity driver injects properties with periods with no way to get at them.

mrdanpsmith opened this issue · 0 comments

When trying to use velocity, it appears to be impossible to evaluate an included property with a "." in it. Which is a problem, because that's how most Java properties files are laid out.

There are a few ways to solve this. I think the best idea would be to separate the properties files and other variables into separate variables within the context. Then within a Velocity template you could do something like: $prop.get("some.property.with.periods") and that would give you the value in the template.

Another option is to use something like ContextTools to allow $context to be used within the templates. That would give the template the ability to pull it out using standard velocity tooling.

Currently, I had to just rename the value in my properties file to get it to show up in my template. It's a workaround, but it isn't ideal.