Created on 02-08-2022 05:13 AM - edited 02-08-2022 05:32 AM
I'm using ExecuteSQL,SplitAvro,ConvertAvroToJSON,EvaluateJsonPath,ReplaceText,ExecuteSQL.
I am trying to replace the content in the flowfile using replaceText processor.
Now, i can replace like this. -> INSERT INTO values (${id},'${name}') . ReplaceText process like this :
INSERT into x values(1,'xx')
INSERT into x values(2,'yy')
INSERT into x values(3,'zz')
I'm sending INSERT query for each line.
But i want to send executesql process like this
INSERT INTO x values (1,'xx'),(2,'yy'),(3,'zz')
Created 02-10-2022 07:06 AM
I used MergeContent and i solved my problem. Thanks !
Created 02-08-2022 01:02 PM
The flow that you are trying to implement is not very efficient and it's hard to achieve what you want to do in that way.
You should try to refactor it using record-based processors, which is much simpler and more efficient to handle a large number of records.
Something like this: ExecuteSQLRecord -> QueryRecord -> PutDatabaseRecord
André
Created 02-10-2022 07:06 AM
I used MergeContent and i solved my problem. Thanks !