mi-volodin commented on pull request #5701: URL: https://github.com/apache/nifi/pull/5701#issuecomment-1026653492
@mattyb149 Hi, we have hit the same problem recently and were also going to think about PR, so many thanks for your work. I would like to clarify one thing if you mind and maybe suggest some additional fixes. We had the problem with `generateUpdate` function. And... I am not sure it is addressed here. According to the code ( [@@ 1135](https://github.com/apache/nifi/pull/5701/files#diff-2a3826165c1a121489bf9a7d8e2536f3781138b24090ed1f5fb9771cd8c7a3c9R1135) in your version) there's a step when all keys are being normalized by `normalizeKeyColumnNamesAndCheckForValues` which also performs quotation if it is set by parameters. However, on [@@ 1170](https://github.com/apache/nifi/pull/5701/files#diff-2a3826165c1a121489bf9a7d8e2536f3781138b24090ed1f5fb9771cd8c7a3c9R1170) we have ```java // Check if this column is an Update Key. If so, skip it for now. We will come // back to it after we finish the SET clause if (!normalizedKeyColumnNames.contains(normalizedColName)) { ``` I.e. `normalizedKeyColumnNames` contains quoted identifiers, while `normalizedColName` is obtained by `normalizeColumnName` [here](https://github.com/mattyb149/nifi/blob/3f7cced8090df6f866eb667b1efb83577e399290/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutDatabaseRecord.java#L1367), which does no quotation. Thus, during this step Key columns will still be included into `SET` block of `UPDATE` statement, which is syntactically wrong. What do you think? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
