Support Questions

Find answers, ask questions, and share your expertise

User defined properties and EL on QueryDatabaseTable using Apache Nifi

avatar
Contributor

Hi guys. I'm using Apache Nifi 1.1.2 and am unable to access user defined attributes when using the QueryDatabaseTable processer. Each of the default attributes on the processer state they not EL accessible but I am able to define my own attributes that are accessible (according to the help prompt (?) next to the attribute) and I’m hoping to use these attributes downstream when writing data to a hdfs location.

For example:

I add the following user defined attributes to a QueryDatabaseTable processer reading data from MyTableSchema.MyTableName

tableName - MyTableName

tableSchema - MyTableSchema

I’m hoping to use this information (together with a PutHDFS processer and EL) to write the incremental data from MyTableSchema.MyTableName to hdfs location /MyTableSchema.MyTableName/flowfileid. Is the entire QueryDatabaseTable not accessible with EL even though I am able to add my own attributes to it?

Any advice would be greatly appreciated.

14953-nifiquerydbtable.png

1 ACCEPTED SOLUTION

avatar
Master Guru

The documentation of the user defined properties for QueryDatabaseTable says:

Initial Max Value Attribute Expression Language

Specifies an initial max value for max value columns. Properties should be added in the format `initial.maxvalue.{max_value_column}`.

So these are meant to be used to specify the initial value of a max value column.

To add attributes to the flow files for down stream processing you can use an UpdateAttribute processor right after QueryDatabaseTable.

View solution in original post

2 REPLIES 2

avatar
Master Guru

The documentation of the user defined properties for QueryDatabaseTable says:

Initial Max Value Attribute Expression Language

Specifies an initial max value for max value columns. Properties should be added in the format `initial.maxvalue.{max_value_column}`.

So these are meant to be used to specify the initial value of a max value column.

To add attributes to the flow files for down stream processing you can use an UpdateAttribute processor right after QueryDatabaseTable.

avatar
Contributor

Thanks Bryan, much appreciated. I wrongly assumed you could add your own properties (in addition to the dynamic ones) on any Processer that allowed you to do so.