Search code examples
apache-nifi

NiFi - Cannot convert CHOICE, type must be explicit


Getting following error while inserting few thousands records to postgres DB.

Error Image

Here is my PutDatabaseRecord config:

PutDatabaseRecord config image


Solution

  • Send one record at a time using SplitProcessor instead of sending whole array of records. (Split Processor -> PutDatabaseRecord) For performance you can split and merge before inserting into database. (SplitProcessor -> Merge Processor -> PutDatabaseRecord processor)