Created 06-10-2018 05:55 PM
Hi,
I have 100K flowfiles generated by custom processor and i need to store them to mySQL DB, I need to process the 100k flowfiles by multiple ConvertJsonToSQL Processors concurrently to speed the insertion process. what is the processor that i should use between the custom processor and ConvertJsonToSQL processors (4 ConvertJsonToSQL processors) in order to achieve that.
Thanks,,
Created on 06-10-2018 06:12 PM - edited 08-17-2019 07:39 PM
Refer to this and this links to configure Record Reader/Writer Controller services.
Flow:
1.Custom processor2.SplitRecord/SplitText processors3.DistributeLoad 4.ConvertJsonToSQL
DistributeLoad Configs:
Number of Relationships | 1 | Determines the number of Relationships to which the load should be distributed | |
Distribution Strategy | round robin |
| Determines how the load will be distributed. If using Round Robin, will not distribute any FlowFiles unless all destinations can accept FlowFiles; when using Next Available, will distribute FlowFiles as long as at least 1 destination can accept FlowFiles. |
Based on the number of splits that you want change the configs in Distribute Load processor and add more ConvertJsonToSQL processor.
In addition please consider using record oriented PutDatabaseRecord processor which works on chunks of data, Configure the Record Reader controller service to read the incoming flowfile, then i think you don't have to split any records also.
Flow:
1.Custom Processor
2.PutDatabaseRecord
-
If the Answer addressed your question, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of issues.
Created on 06-10-2018 06:12 PM - edited 08-17-2019 07:39 PM
Refer to this and this links to configure Record Reader/Writer Controller services.
Flow:
1.Custom processor2.SplitRecord/SplitText processors3.DistributeLoad 4.ConvertJsonToSQL
DistributeLoad Configs:
Number of Relationships | 1 | Determines the number of Relationships to which the load should be distributed | |
Distribution Strategy | round robin |
| Determines how the load will be distributed. If using Round Robin, will not distribute any FlowFiles unless all destinations can accept FlowFiles; when using Next Available, will distribute FlowFiles as long as at least 1 destination can accept FlowFiles. |
Based on the number of splits that you want change the configs in Distribute Load processor and add more ConvertJsonToSQL processor.
In addition please consider using record oriented PutDatabaseRecord processor which works on chunks of data, Configure the Record Reader controller service to read the incoming flowfile, then i think you don't have to split any records also.
Flow:
1.Custom Processor
2.PutDatabaseRecord
-
If the Answer addressed your question, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of issues.
Created 06-11-2018 05:28 PM
Thanks it works.