Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-4393

AbstractDatabaseFetchProcessor handles SQL Server brackets incorrectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.0
    • 1.7.0
    • Extensions
    • None
    • Patch

    Description

      SQL Server allows column names to contain whitespace, in which case they are written in SQL queries inside square brackets. When using processors based on AbstractDatabaseFetchProcessor, such as QueryDatabaseTable they have to be specified in "Maximum-value Columns" in square brackets, because otherwise they would break a SELECT query. However, when such column name is retrieved from ResultSetMetaData, the driver returns it without square brackets. This causes a mismatch between the key used to save last seen maximum value in processor's state and the one used to search for the value later.

      I'm not sure whether the attached patch is very elegant, but it fixes the issue in a simplest way possible.

      Attachments

        Issue Links

          Activity

            People

              ijokarumawak Koji Kawamura
              msiedlarek Mikołaj Siedlarek
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: