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

2021-01-20 Thread Pierre Villard (Jira)


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

Pierre Villard updated NIFI-8043:
-
Fix Version/s: 1.13.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

> 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: 20m
>  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] [Updated] (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:all-tabpanel
 ]

Matt Burgess updated NIFI-8043:
---
Status: Patch Available  (was: In Progress)

> 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
>
> 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] [Updated] (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:all-tabpanel
 ]

Matt Burgess updated NIFI-8043:
---
Affects Version/s: (was: 1.12.0)

> 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
>
> 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] [Updated] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted

2020-11-24 Thread Daniel Cheung (Jira)


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

Daniel Cheung updated NIFI-8043:

Summary: PutDatabaseRecord Postgres Upsert On Conflict keys not quoted  
(was: PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with 
underscores missing)

> 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
>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)


[jira] [Updated] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with underscores missing

2020-11-24 Thread Daniel Cheung (Jira)


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

Daniel Cheung updated NIFI-8043:

Description: 
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

  was:
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"}}
 {{)}}

 

I currently need to disable translate field name and set my table to use snake 
case names to be able to use upsert


> PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with 
> underscores missing
> --
>
> 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
>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 

[jira] [Updated] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with underscores missing

2020-11-24 Thread Daniel Cheung (Jira)


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

Daniel Cheung updated NIFI-8043:

Description: 
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"}}
 {{)}}

 

I currently need to disable translate field name and set my table to use snake 
case names to be able to use upsert

  was:
h2. First Attempt with camel case (translate field name is true)

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 (translate field name is true or false)

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"}}
 {{)}}

 

I currently need to disable translate field name and set my table to use snake 
case names to be able to use upsert


> PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with 
> underscores missing
> --
>
> 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
>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 

[jira] [Updated] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with underscores missing

2020-11-24 Thread Daniel Cheung (Jira)


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

Daniel Cheung updated NIFI-8043:

Description: 
h2. First Attempt with camel case (translate field name is true)

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 (translate field name is true or false)

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"}}
 {{)}}

 

I currently need to disable translate field name and set my table to use snake 
case names to be able to use upsert

  was:
h2. First Attempt with camel case

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

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"}}
 {{)}}


> PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with 
> underscores missing
> --
>
> 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
>Priority: Major
>
> h2. First Attempt with camel case (translate field name is true)
> 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 (translate field name is true or false)
> 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 

[jira] [Updated] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with underscores missing

2020-11-24 Thread Daniel Cheung (Jira)


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

Daniel Cheung updated NIFI-8043:

Summary: PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with 
underscores missing  (was: PutDatabaseRecord Postgres Upsert On Conflict keys 
not quoted with underscores missing if translate field name is true)

> PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with 
> underscores missing
> --
>
> 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
>Priority: Major
>
> h2. First Attempt with camel case
> 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
> 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"}}
>  {{)}}



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


[jira] [Updated] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with underscores missing if translate field name is true

2020-11-24 Thread Daniel Cheung (Jira)


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

Daniel Cheung updated NIFI-8043:

Summary: PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with 
underscores missing if translate field name is true  (was: PutDatabaseRecord 
Postgres Upsert On Conflict keys not quoted with underscores missing)

> PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with 
> underscores missing if translate field name is true
> --
>
> 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
>Priority: Major
>
> h2. First Attempt with camel case
> 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
> 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"}}
>  {{)}}



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


[jira] [Updated] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with underscores missing

2020-11-24 Thread Daniel Cheung (Jira)


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

Daniel Cheung updated NIFI-8043:

Description: 
h2. First Attempt with camel case

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

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"}}
 {{)}}

  was:
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"}}
 {{)}}


> PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with 
> underscores missing
> --
>
> 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
>Priority: Major
>
> h2. First Attempt with camel case
> 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
> 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"}}
>  {{)}}



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


[jira] [Updated] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with underscores missing

2020-11-24 Thread Daniel Cheung (Jira)


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

Daniel Cheung updated NIFI-8043:

Summary: PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with 
underscores missing  (was: PutDatabaseRecord Postgres Upsert On Conflict keys 
not quoted)

> PutDatabaseRecord Postgres Upsert On Conflict keys not quoted with 
> underscores missing
> --
>
> 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
>Priority: Major
>
> 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"}}
>  {{)}}



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


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

2020-11-24 Thread Daniel Cheung (Jira)


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

Daniel Cheung updated NIFI-8043:

Description: 
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"}}
 {{)}}

  was:
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, 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"}}
 {{)}}


> 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
>Priority: Major
>
> 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"}}
>  {{)}}



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


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

2020-11-24 Thread Daniel Cheung (Jira)


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

Daniel Cheung updated NIFI-8043:

Description: 
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, 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"}}
 {{)}}

  was:
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}}.

SQL in question, 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"}}
 {{)}}


> 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
>Priority: Major
>
> 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, 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"}}
>  {{)}}



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


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

2020-11-24 Thread Daniel Cheung (Jira)


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

Daniel Cheung updated NIFI-8043:

Description: 
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, 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"}}
 {{)}}

  was:
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, 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"}}
 {{)}}


> 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
>Priority: Major
>
> 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, 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"}}
>  {{)}}



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