Solved

Reader Max Features to Read Per Feature Type not working

  • 6 February 2018
  • 4 replies
  • 23 views

Badge

I have tried multiple combinations, but it seems the "Max Features to Read Per Feature Type" value is being ignored. I have 14 Feature Classes selected in my "FEATURE_TYPES" Published Parameter, so hence, if I set the value to 2, it should read 28 records but unfortunately it seems to only read 2 records from a random Feature Class.

I am using v2016.1.0.1

Refer @mhab's comments in this idea post: https://knowledge.safe.com/idea/25361/add-a-max-feature-to-read-per-feature-type-paramet.html

icon

Best answer by markatsafe 6 February 2018, 18:02

View original

4 replies

Badge +2

Max Feature Types to read applies to the feature types on the workbench canvas. So if you use Merge Feature Type then that will count as only one feature type - hence only two features are read instead of two features per feature listed in the Feature Types to read parameter.

 

I've created an Idea so please add any additional comments there.
Badge

Thanks, yes, that's not clear.

Badge

I believe this is related to my issue, but unsure. I'm using the FeatureReader transformer on a CSV file that is downloaded to a folder from FTP as part of the job. When the download completes, it hits the feature reader. If I set Max Features to Read to a value, it still reads all the rows of the CSV. I assume this is because the CSV itself is a feature so it counts as 1.

Is there anyway to subset simply so I can test the transforms. I don't want to run the job on the full set of rows immediately. My workaround is to use a Reader on the local CSV file and connect it to the right ports, while disabling the others. Any other way around this that I'm missing? It would be ideal if I could just set a parameter instead of swapping in readers.

Badge +2

This is a known issue and has been fixed for 2019. In FME 2018 and earlier, Max Features to Read will work for a 'traditional' CSV reader, but not in FeatureReader. This relates to work we have been doing on the CSV, and other readers and transformers, to make them much faster (FeatureTables).

If you have FME 2018 then you can use a Sampler to thin out the data after FeatureReader with no performance impact.

Reply