Skip to main content
Question

Feature reader - dynamically expose attributes using schema read in by another FeatureReader (or Schema Scanner)

  • August 7, 2024
  • 1 reply
  • 91 views

p_c_20
Contributor
Forum|alt.badge.img+8

I have a collection of geopackage files, several of which have different feature attribute schemas (attribute names, numbers of attributes). 

I have read the schemas using a FeatureReader, and created a list for each FME_Feature_Type_Name. (I’ve built a concatenated text string here just for visibility): 


 Where I am getting stuck is in using this in a subsequent FeatureReader to define the attributes to expose for each file. I’m using fme_feature_type_name in the read location to grab one file at a time. 

 



But am struggling to use the Schema list or concatenated attribute to drive the attribute exposure. 


I can get all attributes exposed via AttributeExposer, but then I have to use a TestFilter and an AttributeManager to remove the attributes that don’t apply to particular files (because ‘expose all’ picks up all attributes from all files). 

Is there any way this will work? 
 

1 reply

j.m-visma
Contributor
Forum|alt.badge.img+5
  • Contributor
  • March 27, 2025

The SchemaScanner can take feature_type into consideration, if you expose that in your reader, but I haven't been able to expose anything with the schemascanner. 

I have seen the extra attributes show up as unexposed attributes and with the schemascanner you can write those to a file. So maybe you could get your workspace to work with all the attributes unexposed?


Reply


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