Re: PutSQL fragmented transaction error

2023-02-13 Thread João Marcos Polo Junior
Thanks a lot for the response and help! That approach is very helpful. Em seg., 13 de fev. de 2023 às 12:52, Matt Burgess escreveu: > As of Apache NiFi 1.13.0 [1], there are properties in > PutDatabaseRecord that can be used to specify the operation type as > well as the location of the "rows" i

Re: PutSQL fragmented transaction error

2023-02-13 Thread Matt Burgess
As of Apache NiFi 1.13.0 [1], there are properties in PutDatabaseRecord that can be used to specify the operation type as well as the location of the "rows" in the input, to support the use case of nested/structured input. You can add a field to each record specifying the operation type ("insert",

Re: PutSQL fragmented transaction error

2023-02-10 Thread João Marcos Polo Junior
That's great to hear! Im will give it a try. What about performing different operations (such as insert for a set of records, updates for another set of record and the same for deletes) in a transaction? Is it possible with PutDatabaseRecord? Em sex., 10 de fev. de 2023 às 14:29, Matt Burgess esc

Re: PutSQL fragmented transaction error

2023-02-10 Thread Matt Burgess
I agree with Chris here about using PutDatabaseRecord instead of the Split and PutSQL. PutDatabaseRecord will process all records in a FlowFile as a transaction, so in PutDatabaseRecord you can set an AvroReader (to read the records coming out of ExecuteSQL) and the statement type (such as INSERT)

Re: PutSQL fragmented transaction error

2023-02-10 Thread João Marcos Polo Junior
Thanks for replying it. I'm afraid this approach do not work with transaction. How can I process all records in the same transaction? Em sex., 10 de fev. de 2023 às 13:05, Chris Sampson < chris.samp...@naimuri.com> escreveu: > I don't use the database/SQL processors much, but see questions about

Re: PutSQL fragmented transaction error

2023-02-10 Thread Chris Sampson
I don't use the database/SQL processors much, but see questions about these on the Apache NiFi Slack channels quite regularly - you might have better look using ExecuteSQLRecord (can output in Avro or JSON, etc. using your wanted RecordSetWriter Controller Service) then feed that through to a PutDa

Fwd: PutSQL fragmented transaction error

2023-02-10 Thread João Marcos Polo Junior
I’m trying to create a flow (nifi 1.18) to query a database (ExecuteSQL), transform it records to json (ConvertAvroToJson), split it into json objects (SplitJson) and then perform the necessary actions into another database (PutSQL). All json objects splitted from the same original flowfile needs t