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

User defined properties and EL on QueryDatabaseTable using Apache Nifi

Solved Go to solution
Highlighted

User defined properties and EL on QueryDatabaseTable using Apache Nifi

Explorer

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

Accepted Solutions

Re: User defined properties and EL on QueryDatabaseTable using Apache Nifi

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

Re: User defined properties and EL on QueryDatabaseTable using Apache Nifi

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

Highlighted

Re: User defined properties and EL on QueryDatabaseTable using Apache Nifi

Explorer

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.