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

Allow PutDatabaseRecord to optionally create the target table and/or columns if they don't exist

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Extensions
    • Labels:
      None

      Description

      As part of NIFI-6934, the "Database Type" property was added, allowing for DB-specific SQL/DML to be generated. That property could be used with a new true/false property "Create Table" that would create the target table if it didn't already exist. mapping the NiFi Record datatypes to DB-specific column types and generating/executing a DB-specific CREATE TABLE statement. If "Create Table" is set to true and an error occurs while attempting to create the table, the flowfile should be routed to failure or rolled back (depending on the setting of the "Rollback on Failure" property).

      Also it could support some schema migration (adding columns, e.g.) with an additional value in the "Unmatched Field Behavior" property for "Create Column on Unmatched Fields". The use case here is for feature parity with UpdateHiveTable (see NIFI-7989)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mattyb149 Matt Burgess
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: