[jira] [Commented] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted

2023-05-16 Thread Yury Levin (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-8043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723057#comment-17723057
 ] 

Yury Levin commented on NIFI-8043:
--

Hello [~mattyb149] 
I've faced same issue and wrote down steps as I reprodused it in reply to 
[~joaoaqrbarros]'s post:

[https://community.cloudera.com/t5/Support-Questions/Upsert-on-conflict-not-quoting-keys/td-p/355723]
 

> PutDatabaseRecord Postgres Upsert On Conflict keys not quoted
> -
>
> Key: NIFI-8043
> URL: https://issues.apache.org/jira/browse/NIFI-8043
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Reporter: Daniel Cheung
>Assignee: Matt Burgess
>Priority: Major
> Fix For: 1.13.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> h2. First attempt with camel case (fails when translate field name is true or 
> false)
> Given that "Quote Column Identifiers" is enabled, one would expect the column 
> names inside the conflict clause be quoted as well. However, they didn't seem 
> to have been quoted, because my table's column names contain upper and 
> lowercases and the flowfile is routed to the failure relationship of the 
> PutDatabaseRecord processor with the DB error: {{ERROR: column "camelcase" 
> does not exist}}.
> Whether setting "Update Keys" or not did not affect the outcome. If I 
> understand, "Update Keys" would also affect the conflict clause, but it's 
> also not quoted, and does not accept a string with manually quoted column 
> names.
> SQL in question found in the DB error in the log, simplified from what I saw.
> {{INSERT INTO "public"."my_table"("camelCase", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (CAMELCASE)}}
>  {{DO UPDATE SET ("camelCase", "txt") = (}}
>  {{    EXCLUDED."camelCase",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
> h2. Second attempt with snake case (fails when translate field name is true)
> I changed my column names to {{_snake_case, txt}} and try upserting again and 
> it still failed with this SQL in nifi-app.log:
> {{INSERT INTO "public"."my_table"("_snake_case", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (SNAKECASE)}}
>  {{DO UPDATE SET ("}}{{_snake_case}}{{", "txt") = (}}
>  {{    EXCLUDED."}}{{_snake_case}}{{",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
>  
> h2. Current workaround
> I currently need to *disable translate field name* and set my table to *use 
> snake case names as column names* to be able to use upsert



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


[jira] [Commented] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted

2022-10-24 Thread Jira


[ 
https://issues.apache.org/jira/browse/NIFI-8043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17623075#comment-17623075
 ] 

João Barros commented on NIFI-8043:
---

Hello [~mattyb149] 

This issue is still happening in the latest release.

Information here:
 * 
https://community.cloudera.com/t5/Support-Questions/Upsert-on-conflict-not-quoting-keys/td-p/355723

> PutDatabaseRecord Postgres Upsert On Conflict keys not quoted
> -
>
> Key: NIFI-8043
> URL: https://issues.apache.org/jira/browse/NIFI-8043
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Reporter: Daniel Cheung
>Assignee: Matt Burgess
>Priority: Major
> Fix For: 1.13.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> h2. First attempt with camel case (fails when translate field name is true or 
> false)
> Given that "Quote Column Identifiers" is enabled, one would expect the column 
> names inside the conflict clause be quoted as well. However, they didn't seem 
> to have been quoted, because my table's column names contain upper and 
> lowercases and the flowfile is routed to the failure relationship of the 
> PutDatabaseRecord processor with the DB error: {{ERROR: column "camelcase" 
> does not exist}}.
> Whether setting "Update Keys" or not did not affect the outcome. If I 
> understand, "Update Keys" would also affect the conflict clause, but it's 
> also not quoted, and does not accept a string with manually quoted column 
> names.
> SQL in question found in the DB error in the log, simplified from what I saw.
> {{INSERT INTO "public"."my_table"("camelCase", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (CAMELCASE)}}
>  {{DO UPDATE SET ("camelCase", "txt") = (}}
>  {{    EXCLUDED."camelCase",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
> h2. Second attempt with snake case (fails when translate field name is true)
> I changed my column names to {{_snake_case, txt}} and try upserting again and 
> it still failed with this SQL in nifi-app.log:
> {{INSERT INTO "public"."my_table"("_snake_case", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (SNAKECASE)}}
>  {{DO UPDATE SET ("}}{{_snake_case}}{{", "txt") = (}}
>  {{    EXCLUDED."}}{{_snake_case}}{{",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
>  
> h2. Current workaround
> I currently need to *disable translate field name* and set my table to *use 
> snake case names as column names* to be able to use upsert



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


[jira] [Commented] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted

2022-06-02 Thread Juliano Medeiros (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-8043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17545554#comment-17545554
 ] 

Juliano Medeiros commented on NIFI-8043:


Hello [~mattyb149] 

I've put all details here :

[https://stackoverflow.com/questions/72466519/how-to-fix-an-upsert-script-of-a-putdatabaserecord-processor]



Thank you

> PutDatabaseRecord Postgres Upsert On Conflict keys not quoted
> -
>
> Key: NIFI-8043
> URL: https://issues.apache.org/jira/browse/NIFI-8043
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Reporter: Daniel Cheung
>Assignee: Matt Burgess
>Priority: Major
> Fix For: 1.13.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> h2. First attempt with camel case (fails when translate field name is true or 
> false)
> Given that "Quote Column Identifiers" is enabled, one would expect the column 
> names inside the conflict clause be quoted as well. However, they didn't seem 
> to have been quoted, because my table's column names contain upper and 
> lowercases and the flowfile is routed to the failure relationship of the 
> PutDatabaseRecord processor with the DB error: {{ERROR: column "camelcase" 
> does not exist}}.
> Whether setting "Update Keys" or not did not affect the outcome. If I 
> understand, "Update Keys" would also affect the conflict clause, but it's 
> also not quoted, and does not accept a string with manually quoted column 
> names.
> SQL in question found in the DB error in the log, simplified from what I saw.
> {{INSERT INTO "public"."my_table"("camelCase", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (CAMELCASE)}}
>  {{DO UPDATE SET ("camelCase", "txt") = (}}
>  {{    EXCLUDED."camelCase",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
> h2. Second attempt with snake case (fails when translate field name is true)
> I changed my column names to {{_snake_case, txt}} and try upserting again and 
> it still failed with this SQL in nifi-app.log:
> {{INSERT INTO "public"."my_table"("_snake_case", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (SNAKECASE)}}
>  {{DO UPDATE SET ("}}{{_snake_case}}{{", "txt") = (}}
>  {{    EXCLUDED."}}{{_snake_case}}{{",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
>  
> h2. Current workaround
> I currently need to *disable translate field name* and set my table to *use 
> snake case names as column names* to be able to use upsert



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Commented] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted

2022-06-02 Thread Matt Burgess (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-8043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17545551#comment-17545551
 ] 

Matt Burgess commented on NIFI-8043:


Can you share your table definition, sample data, and PutDatabaseRecord 
configuration?

> PutDatabaseRecord Postgres Upsert On Conflict keys not quoted
> -
>
> Key: NIFI-8043
> URL: https://issues.apache.org/jira/browse/NIFI-8043
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Reporter: Daniel Cheung
>Assignee: Matt Burgess
>Priority: Major
> Fix For: 1.13.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> h2. First attempt with camel case (fails when translate field name is true or 
> false)
> Given that "Quote Column Identifiers" is enabled, one would expect the column 
> names inside the conflict clause be quoted as well. However, they didn't seem 
> to have been quoted, because my table's column names contain upper and 
> lowercases and the flowfile is routed to the failure relationship of the 
> PutDatabaseRecord processor with the DB error: {{ERROR: column "camelcase" 
> does not exist}}.
> Whether setting "Update Keys" or not did not affect the outcome. If I 
> understand, "Update Keys" would also affect the conflict clause, but it's 
> also not quoted, and does not accept a string with manually quoted column 
> names.
> SQL in question found in the DB error in the log, simplified from what I saw.
> {{INSERT INTO "public"."my_table"("camelCase", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (CAMELCASE)}}
>  {{DO UPDATE SET ("camelCase", "txt") = (}}
>  {{    EXCLUDED."camelCase",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
> h2. Second attempt with snake case (fails when translate field name is true)
> I changed my column names to {{_snake_case, txt}} and try upserting again and 
> it still failed with this SQL in nifi-app.log:
> {{INSERT INTO "public"."my_table"("_snake_case", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (SNAKECASE)}}
>  {{DO UPDATE SET ("}}{{_snake_case}}{{", "txt") = (}}
>  {{    EXCLUDED."}}{{_snake_case}}{{",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
>  
> h2. Current workaround
> I currently need to *disable translate field name* and set my table to *use 
> snake case names as column names* to be able to use upsert



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Commented] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted

2022-06-02 Thread Juliano Medeiros (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-8043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17545420#comment-17545420
 ] 

Juliano Medeiros commented on NIFI-8043:


Morning, was it fixed? Because I'm using the latest release and I'm having the 
same problem. Can someone help me, ´please? 

 

Kind regards,

Juliano

> PutDatabaseRecord Postgres Upsert On Conflict keys not quoted
> -
>
> Key: NIFI-8043
> URL: https://issues.apache.org/jira/browse/NIFI-8043
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Reporter: Daniel Cheung
>Assignee: Matt Burgess
>Priority: Major
> Fix For: 1.13.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> h2. First attempt with camel case (fails when translate field name is true or 
> false)
> Given that "Quote Column Identifiers" is enabled, one would expect the column 
> names inside the conflict clause be quoted as well. However, they didn't seem 
> to have been quoted, because my table's column names contain upper and 
> lowercases and the flowfile is routed to the failure relationship of the 
> PutDatabaseRecord processor with the DB error: {{ERROR: column "camelcase" 
> does not exist}}.
> Whether setting "Update Keys" or not did not affect the outcome. If I 
> understand, "Update Keys" would also affect the conflict clause, but it's 
> also not quoted, and does not accept a string with manually quoted column 
> names.
> SQL in question found in the DB error in the log, simplified from what I saw.
> {{INSERT INTO "public"."my_table"("camelCase", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (CAMELCASE)}}
>  {{DO UPDATE SET ("camelCase", "txt") = (}}
>  {{    EXCLUDED."camelCase",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
> h2. Second attempt with snake case (fails when translate field name is true)
> I changed my column names to {{_snake_case, txt}} and try upserting again and 
> it still failed with this SQL in nifi-app.log:
> {{INSERT INTO "public"."my_table"("_snake_case", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (SNAKECASE)}}
>  {{DO UPDATE SET ("}}{{_snake_case}}{{", "txt") = (}}
>  {{    EXCLUDED."}}{{_snake_case}}{{",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
>  
> h2. Current workaround
> I currently need to *disable translate field name* and set my table to *use 
> snake case names as column names* to be able to use upsert



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Commented] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted

2022-06-01 Thread Juliano Medeiros (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-8043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17545184#comment-17545184
 ] 

Juliano Medeiros commented on NIFI-8043:


Sorry my images were ignored.

Could you explain the “The key column names don't get quoted in 
PutDatabaseRecord before passing them to the database adapter to generate an 
UPSERT statement.”

I’m stuck here
Thank you


Get Outlook for iOS


> PutDatabaseRecord Postgres Upsert On Conflict keys not quoted
> -
>
> Key: NIFI-8043
> URL: https://issues.apache.org/jira/browse/NIFI-8043
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Reporter: Daniel Cheung
>Assignee: Matt Burgess
>Priority: Major
> Fix For: 1.13.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> h2. First attempt with camel case (fails when translate field name is true or 
> false)
> Given that "Quote Column Identifiers" is enabled, one would expect the column 
> names inside the conflict clause be quoted as well. However, they didn't seem 
> to have been quoted, because my table's column names contain upper and 
> lowercases and the flowfile is routed to the failure relationship of the 
> PutDatabaseRecord processor with the DB error: {{ERROR: column "camelcase" 
> does not exist}}.
> Whether setting "Update Keys" or not did not affect the outcome. If I 
> understand, "Update Keys" would also affect the conflict clause, but it's 
> also not quoted, and does not accept a string with manually quoted column 
> names.
> SQL in question found in the DB error in the log, simplified from what I saw.
> {{INSERT INTO "public"."my_table"("camelCase", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (CAMELCASE)}}
>  {{DO UPDATE SET ("camelCase", "txt") = (}}
>  {{    EXCLUDED."camelCase",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
> h2. Second attempt with snake case (fails when translate field name is true)
> I changed my column names to {{_snake_case, txt}} and try upserting again and 
> it still failed with this SQL in nifi-app.log:
> {{INSERT INTO "public"."my_table"("_snake_case", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (SNAKECASE)}}
>  {{DO UPDATE SET ("}}{{_snake_case}}{{", "txt") = (}}
>  {{    EXCLUDED."}}{{_snake_case}}{{",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
>  
> h2. Current workaround
> I currently need to *disable translate field name* and set my table to *use 
> snake case names as column names* to be able to use upsert



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Commented] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted

2022-06-01 Thread Juliano Medeiros (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-8043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17545180#comment-17545180
 ] 

Juliano Medeiros commented on NIFI-8043:


Hello 
I need some help. 

I'm working on an ETL that extracts data from Progress and stores it into 
PostgreSQL.



However; when I have duplicate keys, I'm having problems with my upsert.

The problem is that the component is creating an invalid script. 
As you can see, it is missing the double quotes. It needs to be: ON CONFLICT 
("cdConstrucao")



My settings are :




Deplayed error :

Kind regards
Juliano


Sent from my iPhone


> PutDatabaseRecord Postgres Upsert On Conflict keys not quoted
> -
>
> Key: NIFI-8043
> URL: https://issues.apache.org/jira/browse/NIFI-8043
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Reporter: Daniel Cheung
>Assignee: Matt Burgess
>Priority: Major
> Fix For: 1.13.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> h2. First attempt with camel case (fails when translate field name is true or 
> false)
> Given that "Quote Column Identifiers" is enabled, one would expect the column 
> names inside the conflict clause be quoted as well. However, they didn't seem 
> to have been quoted, because my table's column names contain upper and 
> lowercases and the flowfile is routed to the failure relationship of the 
> PutDatabaseRecord processor with the DB error: {{ERROR: column "camelcase" 
> does not exist}}.
> Whether setting "Update Keys" or not did not affect the outcome. If I 
> understand, "Update Keys" would also affect the conflict clause, but it's 
> also not quoted, and does not accept a string with manually quoted column 
> names.
> SQL in question found in the DB error in the log, simplified from what I saw.
> {{INSERT INTO "public"."my_table"("camelCase", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (CAMELCASE)}}
>  {{DO UPDATE SET ("camelCase", "txt") = (}}
>  {{    EXCLUDED."camelCase",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
> h2. Second attempt with snake case (fails when translate field name is true)
> I changed my column names to {{_snake_case, txt}} and try upserting again and 
> it still failed with this SQL in nifi-app.log:
> {{INSERT INTO "public"."my_table"("_snake_case", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (SNAKECASE)}}
>  {{DO UPDATE SET ("}}{{_snake_case}}{{", "txt") = (}}
>  {{    EXCLUDED."}}{{_snake_case}}{{",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
>  
> h2. Current workaround
> I currently need to *disable translate field name* and set my table to *use 
> snake case names as column names* to be able to use upsert



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Commented] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted

2021-01-20 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-8043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17269085#comment-17269085
 ] 

ASF subversion and git services commented on NIFI-8043:
---

Commit fb2a8b5820b816d7afddb5141cd064275267f796 in nifi's branch 
refs/heads/main from Matt Burgess
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=fb2a8b5 ]

NIFI-8043: Quote update key column names in PutDatabaseRecord

Signed-off-by: Pierre Villard 

This closes #4772.


> PutDatabaseRecord Postgres Upsert On Conflict keys not quoted
> -
>
> Key: NIFI-8043
> URL: https://issues.apache.org/jira/browse/NIFI-8043
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Reporter: Daniel Cheung
>Assignee: Matt Burgess
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> h2. First attempt with camel case (fails when translate field name is true or 
> false)
> Given that "Quote Column Identifiers" is enabled, one would expect the column 
> names inside the conflict clause be quoted as well. However, they didn't seem 
> to have been quoted, because my table's column names contain upper and 
> lowercases and the flowfile is routed to the failure relationship of the 
> PutDatabaseRecord processor with the DB error: {{ERROR: column "camelcase" 
> does not exist}}.
> Whether setting "Update Keys" or not did not affect the outcome. If I 
> understand, "Update Keys" would also affect the conflict clause, but it's 
> also not quoted, and does not accept a string with manually quoted column 
> names.
> SQL in question found in the DB error in the log, simplified from what I saw.
> {{INSERT INTO "public"."my_table"("camelCase", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (CAMELCASE)}}
>  {{DO UPDATE SET ("camelCase", "txt") = (}}
>  {{    EXCLUDED."camelCase",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
> h2. Second attempt with snake case (fails when translate field name is true)
> I changed my column names to {{_snake_case, txt}} and try upserting again and 
> it still failed with this SQL in nifi-app.log:
> {{INSERT INTO "public"."my_table"("_snake_case", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (SNAKECASE)}}
>  {{DO UPDATE SET ("}}{{_snake_case}}{{", "txt") = (}}
>  {{    EXCLUDED."}}{{_snake_case}}{{",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
>  
> h2. Current workaround
> I currently need to *disable translate field name* and set my table to *use 
> snake case names as column names* to be able to use upsert



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted

2021-01-20 Thread Matt Burgess (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-8043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17268952#comment-17268952
 ] 

Matt Burgess commented on NIFI-8043:


The key column names don't get quoted in PutDatabaseRecord before passing them 
to the database adapter to generate an UPSERT statement.

> PutDatabaseRecord Postgres Upsert On Conflict keys not quoted
> -
>
> Key: NIFI-8043
> URL: https://issues.apache.org/jira/browse/NIFI-8043
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: 1.12.0
>Reporter: Daniel Cheung
>Assignee: Matt Burgess
>Priority: Major
>
> h2. First attempt with camel case (fails when translate field name is true or 
> false)
> Given that "Quote Column Identifiers" is enabled, one would expect the column 
> names inside the conflict clause be quoted as well. However, they didn't seem 
> to have been quoted, because my table's column names contain upper and 
> lowercases and the flowfile is routed to the failure relationship of the 
> PutDatabaseRecord processor with the DB error: {{ERROR: column "camelcase" 
> does not exist}}.
> Whether setting "Update Keys" or not did not affect the outcome. If I 
> understand, "Update Keys" would also affect the conflict clause, but it's 
> also not quoted, and does not accept a string with manually quoted column 
> names.
> SQL in question found in the DB error in the log, simplified from what I saw.
> {{INSERT INTO "public"."my_table"("camelCase", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (CAMELCASE)}}
>  {{DO UPDATE SET ("camelCase", "txt") = (}}
>  {{    EXCLUDED."camelCase",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
> h2. Second attempt with snake case (fails when translate field name is true)
> I changed my column names to {{_snake_case, txt}} and try upserting again and 
> it still failed with this SQL in nifi-app.log:
> {{INSERT INTO "public"."my_table"("_snake_case", "txt")}}
>  {{VALUES ("test", "test")}}
>  {{ON CONFLICT (SNAKECASE)}}
>  {{DO UPDATE SET ("}}{{_snake_case}}{{", "txt") = (}}
>  {{    EXCLUDED."}}{{_snake_case}}{{",}}
>  {{    EXCLUDED."txt"}}
>  {{)}}
>  
> h2. Current workaround
> I currently need to *disable translate field name* and set my table to *use 
> snake case names as column names* to be able to use upsert



--
This message was sent by Atlassian Jira
(v8.3.4#803005)