Support Questions
Find answers, ask questions, and share your expertise

Is it possible to nest variables in Apache Nifi?

Is it possible to nest variables in Apache Nifi?

Explorer

I have two properties defined in a property file. One called schema.tableX.primary_key and another called schema.tableY.primary_key

Rather than have two processors that do the same thing with each of these variables I'd like to define one process that uses a variable of the form ${schema.${table_name}.primary_key}. Then be able to define the table_name somewhere else. Is that possible?

1 REPLY 1

Re: Is it possible to nest variables in Apache Nifi?

Explorer
I was ultimately able to do this. The problem I was having is that I tried to create table_name as an attribute in the same processor I was then trying to use it in. By creating table_name in one processor then using it in the next to build the nested variable it worked okay.