[ 
https://issues.apache.org/jira/browse/NIFI-7921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre Villard resolved NIFI-7921.
----------------------------------
    Resolution: Feedback Received

Apache NiFi 1.x is no longer maintained and no new release is planned on the 
1.x release line. Marking as resolved as part of a cleanup operation. Please 
open a new one with an updated description if this is still relevant for NiFi 
2.x.

> ConvertJSONToSQL incorrectly generates UPDATE statement if _ in column name
> ---------------------------------------------------------------------------
>
>                 Key: NIFI-7921
>                 URL: https://issues.apache.org/jira/browse/NIFI-7921
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.9.1, 1.12.1
>         Environment: Windows Server 2016
>            Reporter: Matthew Barrett
>            Priority: Critical
>         Attachments: image-2020-10-14-07-21-09-219.png
>
>
> A database table in SQL Server has a table with structure:
> {code:java}
> CREATE TABLE [Form].[CSI_EXHIBIT]( 
> [exhibit_Id] [numeric](7, 0) IDENTITY(1,1) NOT NULL, 
> [Submission_Id] [numeric](7, 0) NOT NULL, 
> [PROPERTY_REF] [varchar](55) NULL, 
> [PROPERTY_ID] [varchar](55) NULL, 
> CONSTRAINT [P_CSI_EXHIBIT] PRIMARY KEY CLUSTERED ( 
>   [exhibit_Id] ASC)) ON [PRIMARY])
> GO{code}
>  
> ConvertJSONToSQL properties:
> !image-2020-10-14-07-21-09-219.png!
> *Database Driver:*
> sqljdbc_8.4 (x64)
> *Java:* 8 (x64)
> *INPUT (Flow Control):*
> {code:java}
> {"PROPERTY_REF":"173021032000000315005011","EXHIBIT_ID":"51"}{code}
> *OUTPUT (SQL):*
> If you have "Translate Field Names" set to false we get: (no column in where)
> {code:java}
> UPDATE Form.CSI_EXHIBIT SET PROPERTY_REF = ? WHERE{code}
> If you have "Translate Field Names" set to true we get: (incorrect column in 
> where should be EXHIBIT_ID)
> {code:java}
> UPDATE Form.CSI_EXHIBIT SET PROPERTY_REF = ? WHERE EXHIBITID = ?{code}
>  
> I have tried all upper-case, tried matching case exactly to table



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to