[
https://issues.apache.org/jira/browse/NIFI-5723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16660445#comment-16660445
]
Uwe Geercken commented on NIFI-5723:
------------------------------------
Another comment. The column names are forced to uppercase. If in other
processors, a case sensitive compare is done - e.g. schema versus table column
names, then this would not work. So I would either remove the to uppercase here
or make it configurable in the processors properties.
Uwe
> PutDatabaseRecord strips underbar character from column names
> -------------------------------------------------------------
>
> Key: NIFI-5723
> URL: https://issues.apache.org/jira/browse/NIFI-5723
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core UI
> Affects Versions: 1.7.1
> Environment: Red Hat Enterprise Linux Server release 7.5 (Maipo).
> Intel(R) Xeon(R) CPU E5-2683 v4 @ 2.10GHz 16 cores. 32 Gb RAM. OpenJDK
> Runtime Environment (build 1.8.0_181-b13)
> Reporter: Uwe Geercken
> Priority: Major
>
> In *PutDatabaseRecord.java* there is following code:
> private static String normalizeColumnName(final String colName, final boolean
> translateColumnNames) {
> return colName == null ? null : (translateColumnNames ?
> colName.toUpperCase().replace("_", "") : colName);
> }
> If translateColumnNames is set to true, then the underbar character is
> stripped from the column names.
> And it is also here:
> final ColumnDescription desc =
> tableSchema.getColumns().get(normalizeColumnName(fieldName,
> settings.translateFieldNames));
> if (desc == null && !settings.ignoreUnmappedFields) {
> throw new SQLDataException("Cannot map field '" +
> fieldName + "' to any column in the database");
> }
> I do not see a reason why this is done. An underbar is a common delimiter in
> database column names.
> Specifically, I have data comming from an Oracle database which is all
> uppercase and with the underbar character as the delimiter in the column
> names and due to the current code, I can not update my MySQL database using
> the same column names.
> Trying to solve the issue in other ways does not really work as well.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)