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

ExecuteSQLRecord support Oracle timestamp when `Use Avro Logical Types` is true

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.14.0
    • 1.16.0
    • Extensions
    • None

    Description

      When the source db is Oracle, and the table has `timestamp` column, using `ExecuteSQLRecord`(the same as `QueryDatabaseTableRecord`)  and set `Use Avro Logical Types` true,  we will get sth like this:

      ```

      Caused by: java.io.IOException: org.apache.nifi.serialization.record.util.IllegalTypeConversionException: Cannot convert value [2021-08-19 10:58:50.000001] of type class oracle.sql.TIMESTAMP to Timestamp for field TS
      at org.apache.nifi.processors.standard.sql.RecordSqlWriter.writeResultSet(RecordSqlWriter.java:88)
      at org.apache.nifi.processors.standard.AbstractExecuteSQL.lambda$onTrigger$1(AbstractExecuteSQL.java:302)
      ... 14 common frames omitted

      ```

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Ku_Cheng ZhangCheng
            Ku_Cheng ZhangCheng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 3h 20m
                3h 20m

                Slack

                  Issue deployment