Skip to main content
Solved

Why is featurereader reading way more records than are in the input?


rmcgregor

Starting out with feature reader, and I am definitely missing something. The input dataset has about 1,600 records. Why is the output at 366,458 (and counting) about 10% of the way through?

Thank you,

image

Best answer by geomancer

Visualization of the three different possibilities I mentioned.

image

View original
Did this help you find an answer to your question?

8 replies

geomancer
Evangelist
Forum|alt.badge.img+48
  • Evangelist
  • August 18, 2023

Yeah, this is a common mistake...

As the documentation mentions, a complete read is done for each feature that enters the Initiator port

The Initiator exit port shows there are 218 initiating objects processed (so far), so every record in the input data set has been read 218 times (so far).

You should have only one feature enter the FeatureReader.


rmcgregor
  • Author
  • August 18, 2023

Thank you. Can you select for a single record in the input? ie 'uniqueid = 1'?


geomancer
Evangelist
Forum|alt.badge.img+48
  • Evangelist
  • August 18, 2023

You can use a Sampler, sampling only the first feature that enters.

Or you can place the FeatureReader after a Creator.

Or maybe (depending on the input source) you can replace the Creator and the FeatureReader with a SQLCreator.


geomancer
Evangelist
Forum|alt.badge.img+48
  • Evangelist
  • Best Answer
  • August 18, 2023

Visualization of the three different possibilities I mentioned.

image


rmcgregor
  • Author
  • August 18, 2023

Thank you. I appreciate it. Yes, it was reading each record 1681 times. A where clause that selected a single records seemed to work.


rmcgregor
  • Author
  • August 18, 2023

I've tried scenario one and the 'generic' output, which has the correct number of records, has no fields '<no schema>'


rmcgregor
  • Author
  • August 18, 2023

Sampler and specifying the output port seems to do the trick. I really appreciate your help.


geomancer
Evangelist
Forum|alt.badge.img+48
  • Evangelist
  • August 21, 2023
rmcgregor wrote:

Sampler and specifying the output port seems to do the trick. I really appreciate your help.

Ah yes, I created a quick mockup for the visualization. You should indeed specify the output port.

I'm glad I could help you.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings