Skip to main content

I'm reading (only for example) a xls file with 3 sheets by reader using "Single merger Feature tipe" option.

So this is result in inspector:

I would like to count number of attribute for each feature type (2 for tab_A_in , 4

for tab_B_in, 3 for tab_C_in) obtainig features with a new "attribute_count" attribute (I don't know obviously first number of feature types and number of attributes so I have to find a dinamic way to obtain result):

If you read the schema you will get one feature per feature type, each with an attribute list, you can then use a ListElementCounter to get the number of attributes.

 

 

You can read the schema using the Schema Reader, or you can use a FeatureReader transformer, and the schema output port.


Great! Thank you


Reply