Answers for "max features to read on a folder" https://knowledge.亚搏在线safe.com/questions/59004/max-features-to-read-on-a-folder.html The latest answers for the question "max features to read on a folder" Answer by barrett_h https://knowledge.safe.com/answers/59022/view.html

Thank you both@jlutherthomasand@danilo_inovacao.It's not exactly the solution I had in mind but it works great none the less!I was intent on trying to ensure the workspace read only a set number of features but by using the Directory and File Pathnames reader it still reads all the features, but with little impact on the performance of the workspace.I ended up with the following set up (the Directory and File Pathnames reader has the Allowed Path Types set to FILE):

I found that the Max Features to Read parameter in the FeatureReader does not work as I want it to ie.it is counting within a dataset not across all the datasets.

Thanks very much for the suggestions.

Fri, 01 Dec 2017 00:57:53 GMT barrett_h
Answer by danilo_fme https://knowledge.safe.com/answers/59021/view.html

Hi@barrett_h,

Just to illustrate that the@jlutherthomasdid write you:

1)Reader - Directory and File Pathnames

2) TransformerCounterto generate id for each file your folder

3) TransformerTesterto filter by attributecounter =< max_feature( published parameters )

4) TransformerFeatureReaderto get files using the attribute path_windows.

Attached the Workspace.

Thanks,workspace-max-features-to-read.fmw

Danilo

Fri, 01 Dec 2017 00:10:07 GMT danilo_fme
Answer by jlutherthomas https://knowledge.safe.com/answers/59019/view.html

Hi@barrett_h
Can you use the Directory and File Pathnames reader first, to read in folders and then pass the first X through to a FeatureReader?
You set it to only read in folder names, and set the maximum number of features to read (Folders).


If you want to read only X number of features per folder, then in the FeatureReader you can also set the number of features to read, which it would read for each input folder coming from the PATH reader.

Fri, 01 Dec 2017 00:01:55 GMT jlutherthomas