[ 
https://issues.apache.org/jira/browse/NIFI-3704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15983933#comment-15983933
 ] 

ASF subversion and git services commented on NIFI-3704:
-------------------------------------------------------

Commit 4303e4742adc0b9707b88427c8a167580f5d717d in nifi's branch 
refs/heads/master from [~mattyb149]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=4303e47 ]

NIFI-3704: Add PutDatabaseRecord processor

NIFI-3704: Incorporated review comments

NIFI-3704: Updated PutDatabaseRecord documentation, including limitations on 
Update records

NIFI-3704: Added retry paths for transient SQL errors

NIFI-3704: Updated to use renamed RecordReaderFactory and catch 
SchemaNotFoundException

NIFI-3704: Added better error handling and rollback

This closes #1677.

Signed-off-by: Koji Kawamura <[email protected]>


> Add PutDatabaseRecord processor
> -------------------------------
>
>                 Key: NIFI-3704
>                 URL: https://issues.apache.org/jira/browse/NIFI-3704
>             Project: Apache NiFi
>          Issue Type: New Feature
>          Components: Extensions
>            Reporter: Matt Burgess
>            Assignee: Matt Burgess
>             Fix For: 1.2.0
>
>
> With the inclusion of NIFI-1280, which added Controller Services for 
> RecordReaders and RecordWriters, we could now support a processor that reads 
> records in, generates SQL statements for those records (with a specified verb 
> such as INSERT, UPDATE, DELETE, etc.), and can execute all the records in one 
> flow file as a batch. This would allow the processor to use a single 
> PreparedStatement and, for a flow file containing multiple records, would be 
> able to execute them all at once. This is in contrast to PutSQL which handles 
> batches across flow files (if fragmented transactions are enabled) or with a 
> discrete set (by taking at most a specified number of flow files at a time).
> This processor (called PutDatabaseRecord) would effectively act like the 
> combination of ConvertJSONToSQL and PutSQL, with the added features of being 
> able to take records in an arbitrary format (given that there is a 
> RecordReader implementation for that format) such as Avro, JSON, CSV, etc. 
> and execute all the statements for the flow file at once.
> Another improvement upon what can be done in ConvertJSONToSQL would be to 
> support BEGIN, COMMIT, and SQL verbs. This could be accomplished by adding an 
> AllowableValue to the dropdown, letting the user select "Use statement.type 
> Attribute". If this was selected, then the verb would be expected to be in 
> the value of the "statement.type" attribute of the incoming flow file.  Note 
> that this may supercede or deprecate the need for NIFI-3676, unless this 
> capability is also desired for that processor.
> For BEGIN and COMMIT verbs, the contents of the record(s) are not needed, as 
> the type itself should be enough to generate the appropriate SQL commands. 
> For the "SQL" Statement type, the processor could either expect the flow file 
> to contain a SQL statement (so the RecordReader would not be used), or it 
> could expect a field called "sql" that contains the SQL statement as its 
> value.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to