philenius / sum-json-array-of-numbers-custom-nifi-processor

Custom NiFi processor which sums up numbers in a given JSON array

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom NiFi Processor: Sum JSON Array of Numbers

This custom NiFi processor sums up all numbers in a given JSON array. The numbers can be of type float, double, long, integer, etc. Internally, this processor uses BigDecimal for parsing the numbers and calculating the sum. Scale and precision of the sum will be based on the number with the greatest precision and or scale so that there's no loss neither in precision nor in scale.

⚠️ Requires JDK 8!

Build

mvn package

Deployment

  1. The command mvn package will create a .nar (NiFi Archive) file in nifi-sum-json-array-of-numbers-custom-nifi-processor-nar/target/.

  2. Copy the file nifi-sum-json-array-of-numbers-custom-nifi-processor-nar-1.0.nar to your NiFi installation dir into the subfolder $NIFI_HOME/lib/.

  3. Restart NiFi.

About

Custom NiFi processor which sums up numbers in a given JSON array


Languages

Language:Java 100.0%