Dorian Bugeja created NIFI-8393:
-----------------------------------
Summary: PutDatabaseRecord PostgreSQL JSON column order invalid
type inference
Key: NIFI-8393
URL: https://issues.apache.org/jira/browse/NIFI-8393
Project: Apache NiFi
Issue Type: Bug
Components: Core Framework
Affects Versions: 1.13.2, 1.13.1, 1.13.0
Reporter: Dorian Bugeja
Attachments: image-2021-04-03-05-18-07-793.png,
image-2021-04-03-05-23-02-173.png, image-2021-04-03-05-43-12-007.png,
image-2021-04-03-05-54-35-111.png, nifi_order_issue.json
Hi,
TLDR Suspect: Record type mapping incorrect order results in error when there
is an order mismatch between
I'm having some weird behaviour with PutDatabaseRecord 1.13.2 connecting to
PostgreSQL 13.2. When I try to insert a new record containing a datetime, I'm
getting a column type mismatch as it's seen varying character (the datatype in
the debug output is 97). The weird part is that there are instances where the
file is successfully submitted as seen in screenshot 2. In screenshot 1, I'm
able to insert the row success when using ExecuteSQLRecord (and ExecuteSQL) for
the one that failed. I think this is related to an issue I've opened earlier
NIFI-8244 however I'm not sure if they are the same. Screenshot 3 shows the
structure of my table while screenshot 4 shows the inferred dataTypes. Please
find attached also a nifi_order_issue.json showing 3 sample files, 1 failed, 2
successful, 3 is 1 reordered and succesful)
JDBC Driver being used =
[https://jdbc.postgresql.org/download/postgresql-42.2.12.jar]
The controllers were all to Infer schema
!image-2021-04-03-05-18-07-793.png|width=868,height=357!
Screenshot 2)
!image-2021-04-03-05-23-02-173.png|width=1112,height=233!
Screenshot 3)
!image-2021-04-03-05-43-12-007.png|width=365,height=201!
Screenshot 4)
!image-2021-04-03-05-54-35-111.png|width=527,height=164!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)