I am using NiFi to load data from database A in json record format and want to insert json record into a json column of database B.
A => ExecuteSQLRecord => [jsonRow,...] => [?] => B.table(data json)
which processor should I use at the position [?]. I tried jolt and PutDatabaseRecord, but failed:
...[jsonRow,...] => jolt =>[{data:jsonRow},...]=> PutDatabaseRecord => B.Table(data json)
I got error:
Batch entry 0 insert into schema.table(data) values((‘MapRecord [{…}]’)) was aborted: ERROR: invalid input syntax for type json Detail: Token “MapRecord” is invalid. Where: JSON data, line 1: MapRecord… unnamed portal parameter $1 = ‘…’ Call getNextException to see other errors in the batch.