[
https://issues.apache.org/jira/browse/NIFI-3540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15888842#comment-15888842
]
ASF GitHub Bot commented on NIFI-3540:
--------------------------------------
Github user patricker commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1547#discussion_r103548585
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/QueryDatabaseTable.java
---
@@ -437,7 +439,7 @@ public void processRow(ResultSet resultSet) throws
IOException {
if (nrOfColumns > 0) {
for (int i = 1; i <= nrOfColumns; i++) {
String colName =
meta.getColumnName(i).toLowerCase();
- String fullyQualifiedMaxValueKey =
getStateKey(meta.getTableName(i), colName);
+ String fullyQualifiedMaxValueKey =
getStateKey(tableName, colName);
--- End diff --
I found a discussion on this from way back in 2007 where it sounded like it
depended on which cursor type was used to bring back the results, and which
column types were included.
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/55e8cbb2-b11c-446e-93ab-dc30658caf99/resultsetmetadatagettablename-returns-instead-of-table-name?forum=sqldataaccess
> QueryDatabaseTable Failing to Track MS SQL Max Values
> -----------------------------------------------------
>
> Key: NIFI-3540
> URL: https://issues.apache.org/jira/browse/NIFI-3540
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.2.0
> Reporter: Peter Wicks
> Assignee: Peter Wicks
> Priority: Blocker
>
> A recent change was made to allow for EL to be used in QDB and GTF processors
> for dynamic table name and max value column tracking.
> Part of this change lead to table names being retrieved dynamically from the
> ResultSetMetadata rather then using the value returned by resolving the EL.
> In the MS SQL JDBC driver there is a known bug (for the last 10 years...)
> where sometimes getTableName returns an empty string rather then the
> table/view name.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)