I would like to use the WorskspaceRunner for optimize the performances of my treatments, but I’ve difficulties to configure them. More precisely, I don’t how can I configure the reader/writer of child workbench, whereas I try to do same things like this tutorial.
In this example, I try to have in input, a filter on limited objects, but in output I’ve all objects.
This is my main workbench :
And this is my child workbench :
How can I can I do ?
Thank you very muche.
Page 1 / 1
You’ll need to have a user parameter in your child workspace that you can use to limit the amount of data it’s going to process, then fill that parameter dynamically through the WorkspaceRunner.
Without knowing a bit more about what you’re trying to do and how you could potentially divide the data up it’ll be hard to give you more detailed advice.
Dear @redgeographics ,
Thank you very much for your reply.
In this case, and to begin, I just want to keep fex line form my ESRI Shapefile, and use a WorkspaceRunner to run a LineCombiner.
I’ve, User parameter in my parent workbench, where I’ve my source shapefile :
And after, in my child workbench, I’ve two User parameter :
1/ The same source from my parent workbench where I’ve the Sapefile
2/ Gesojson writter, for the ouptut of my workbench (it is this file waht I read in the FeatureReader)
Okay, so is there a logical way that you can divide those lines? Since you’re grouping on code_ouvra in your LineCombiner that is probably best, do you know how many unique values there are for that?
Assuming it’s not too many:
Change your child workspace to filter out a single value for code_ouvra and then use the LineCombiner on those. Make that value a User Parameter
Change your parent workspace to have a Sampler after reading your data, set that to group by code_ouvra and only pass the first feature. Essentially this gives you all the unique values for code_ouvra.
Have the WorkspaceRunner run your child worksplace and plug the code_ouvra attribute into that User Parameter.
You should end up with one file per code_ouvra, so you’ll need to combine them in the end, I think your FeatureReader does that.
There’s still a bit too much overhead for my liking: the child workspace does read all of the features before selecting them, so this may not be an improvement.