Kirill Demidov
Kirill Demidov

Reputation: 79

insert record with column jsonb into Postgres through NIFI

I have this kind of record in Postgres table:

{"id":1031435,"event_id":"Formula_257","formula_id":257,"ts_start":1583164200084000,"ts_end":1583164484960000,"type":"formula","details":{"6aa0734f-6d6a-4b95-8a2b-2dde346f9df7":{"PowerActiveTriPhase":183836912}},"ack_ts":null,"ack_user":null}

I have NiFi flow: enter image description here

When I§m trying to insert record to database (PuDataBaseRecord) getting this error:

PutDatabaseRecord[id=97f19c8c-0171-1000-ffff-ffffda61f966] Failed to process StandardFlowFileRecord[uuid=be8fe243-be1d-45c8-aefa-2bff1c6eb3d0,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1587457195427-149, container=default, section=149], offset=94457, length=242],offset=0,name=be8fe243-be1d-45c8-aefa-2bff1c6eb3d0,size=242] due to Unsupported Types value: 2,002: 

I suppose that problem is in JSONB format of one of columns in record. Then I remove this column from flat file I'm able to insert record to table.

Does anyone have any idea how to handle with it?

Thanks,

Upvotes: 2

Views: 1066

Answers (1)

mattyb
mattyb

Reputation: 12093

At the time of this writing (NiFi 1.11.4), it is still an open issue (NIFI-5901).

Upvotes: 1

Related Questions