Skip to main content
Solved

Using FeatureReader with generic output causes ListElementCounter transformers to be invalid.

  • February 28, 2018
  • 4 replies
  • 85 views

Forum|alt.badge.img

I have a FeatureReader for WFS. Because I want it to work with any WFS source I have parameterised the Dataset and "Feature types to read" fields and set the output to Single Output port.This means that I have to use the Generic output port.

Further down the workspace I have some transformers that do logging. I have a ListBuilder followed by a ListElementCounter, so I can log the number of records returned by the WFS service. I also have an UpdateDetector with the same arrangement.

Before I started using the generic output port, everything was OK. But since I have used the Generic port, some ListElementCounters are showing problems. (The one connected to the WFS reader and also the one connected to the Unchanged port of the UpdateDetector. Others are OK.) The ListAttribute fields are showing up as red and they don't seem to be able to read the _list{} attribute that should be supplied by the ListBuilder.

If I run the workspace, it seems to still work, but of course I get a warning about invalid parameters.

I'm guessing the problem might be that since I stopped using a strongly-typed reader the ListBuilder doesn't know what its input is and whether it can be turned into a list. Is there anything I can do to get rid of the red fields?

Best answer by takashi

Hi @rohan, FME Workbench won't automatically expose attribute names under the <Generic> port of the FeatureReader, since the schema of unknown feature type cannot be detected when creating the workspace. In the situation, the ListBuilder too doesn't expose list name and therefore it makes the List Attribute field in the following ListElementCounter red. I think it's the reason for the symptom you have encountered.

To resolve the symptom, try exposing one or more known attribute name manually with the Attributes to Expose parameter in the FeatureReader (see Output / Attribute and Geometry Handling / <Generic> Port section in the parameters dialog).

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

4 replies

takashi
Contributor
Forum|alt.badge.img+21
  • Contributor
  • Best Answer
  • March 1, 2018

Hi @rohan, FME Workbench won't automatically expose attribute names under the <Generic> port of the FeatureReader, since the schema of unknown feature type cannot be detected when creating the workspace. In the situation, the ListBuilder too doesn't expose list name and therefore it makes the List Attribute field in the following ListElementCounter red. I think it's the reason for the symptom you have encountered.

To resolve the symptom, try exposing one or more known attribute name manually with the Attributes to Expose parameter in the FeatureReader (see Output / Attribute and Geometry Handling / <Generic> Port section in the parameters dialog).


takashi
Contributor
Forum|alt.badge.img+21
  • Contributor
  • March 1, 2018
takashi wrote:

Hi @rohan, FME Workbench won't automatically expose attribute names under the <Generic> port of the FeatureReader, since the schema of unknown feature type cannot be detected when creating the workspace. In the situation, the ListBuilder too doesn't expose list name and therefore it makes the List Attribute field in the following ListElementCounter red. I think it's the reason for the symptom you have encountered.

To resolve the symptom, try exposing one or more known attribute name manually with the Attributes to Expose parameter in the FeatureReader (see Output / Attribute and Geometry Handling / <Generic> Port section in the parameters dialog).

Here. Nesting of the parameter groups here might be too deep... @DanAtSafe, how do you think?

 


itay
Supporter
Forum|alt.badge.img+16
  • Supporter
  • March 1, 2018

That is correct, the generic port does not automatically expose the attributes and manually entering them usually solves this kind of issues.


Forum|alt.badge.img
  • Author
  • March 2, 2018

Thanks for the suggestion. I think it has solved my problem.


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