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

PutDatabaseRecord PostgreSQL JSON column order invalid type inference

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.13.0, 1.13.1, 1.13.2
    • None
    • Core Framework
    • None

    Description

      Hi,

      I'm having some weird behaviour with PutDatabaseRecord 1.13.2 connecting to PostgreSQL 13.2. When I try to insert a new record containing a datetime, I'm getting a column type mismatch as it's seen varying character (the datatype in the debug output is 97). The weird part is that there are instances where the file is successfully submitted as seen in screenshot 2. In screenshot 1, I'm able to insert the row success when using ExecuteSQLRecord (and ExecuteSQL) for the one that failed. I think this is related to an issue I've opened earlier NIFI-8244 however I'm not sure if they are the same. Screenshot 3 shows the structure of my table while screenshot 4 shows the inferred dataTypes. Please find attached also a nifi_order_issue.json showing 3 sample files, 1 failed, 2 successful, 3 is 1 reordered and succesful)

      JDBC Driver being used = https://jdbc.postgresql.org/download/postgresql-42.2.12.jar

      The controllers were all to Infer schema

       

       

      Screenshot 2)

      Screenshot 3)

      Screenshot 4)

       

      Attachments

        1. nifi_order_issue.json
          2 kB
          Dorian Bugeja
        2. image-2021-04-03-05-54-35-111.png
          152 kB
          Dorian Bugeja
        3. image-2021-04-03-05-43-12-007.png
          47 kB
          Dorian Bugeja
        4. image-2021-04-03-05-23-02-173.png
          363 kB
          Dorian Bugeja
        5. image-2021-04-03-05-18-07-793.png
          472 kB
          Dorian Bugeja

        Activity

          People

            Unassigned Unassigned
            SunSatION Dorian Bugeja
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: