Skip to main content
Question

How can I only select feature types within a .gdb that contain certain characters within the name ?


joneszero
Contributor
Forum|alt.badge.img+4

What I've done so far ... 

  1. I've selected a .fgb from a location (the location will stay the same, however, there will be multiple .gdbs that come and go over time) I added a reader, Schema (Any Format), filtered for *.gdb.
  2. I added a FeatureReader, with a WHERE clause to only look for ... @Value(fme_feature_type_name) LIKE '%M_CSCL%' ...

However, the way I've set up the FeatureReader doesn't work in it's current state.

Any hints/improvements/better ways to achieve this would be appreciated, see the attached workspace.

thanks

Jeremy

 

 

 

7 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

Put a Tester between the reader and the featurereader to test @Value(fme_feature_type_name) LIKE '%M_CSCL%' and remove the where clause from the featurereader.


joneszero
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • December 2, 2022
nielsgerrits wrote:

Put a Tester between the reader and the featurereader to test @Value(fme_feature_type_name) LIKE '%M_CSCL%' and remove the where clause from the featurereader.

Thanks, however, frustratingly despite doing the above, all the feature_type_names pass the Tester.

Is there something askew with the Schema (Any Format) Reader ?

 


nielsgerrits
VIP
Forum|alt.badge.img+54
joneszero wrote:

Thanks, however, frustratingly despite doing the above, all the feature_type_names pass the Tester.

Is there something askew with the Schema (Any Format) Reader ?

 

Without data and workspace it is hard to say, but I guess your did not got the syntax right.

2022-12-02_06h14_24This should work fine.

 

I can't comment on the Schema (Any Format) Reader as I never use it. I only use FeatureReaders and when I want to read schema's I set the Features To Read to Schema Features.

2022-12-02_06h17_57


joneszero
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • December 2, 2022
joneszero wrote:

Thanks, however, frustratingly despite doing the above, all the feature_type_names pass the Tester.

Is there something askew with the Schema (Any Format) Reader ?

 

Here's a test dataset, I'll try the above


nielsgerrits
VIP
Forum|alt.badge.img+54
joneszero wrote:

Thanks, however, frustratingly despite doing the above, all the feature_type_names pass the Tester.

Is there something askew with the Schema (Any Format) Reader ?

 

Works for me:

2022-12-02_12h10_41 


joneszero
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • December 5, 2022
joneszero wrote:

Thanks, however, frustratingly despite doing the above, all the feature_type_names pass the Tester.

Is there something askew with the Schema (Any Format) Reader ?

 

thank you @nielsgerrits​ this is great.

Adding on to the above ... I'd like to add an Attribute Manager to the passed features, add/remove some, and write to a FGB. However, only the schema is coming through ..

attr001the attributes of '%M_CSCL%' objects are ..

attr002How can we pass the feature geometry/attributes through this process as well ?

 


nielsgerrits
VIP
Forum|alt.badge.img+54
joneszero wrote:

Thanks, however, frustratingly despite doing the above, all the feature_type_names pass the Tester.

Is there something askew with the Schema (Any Format) Reader ?

 

I think you forgot the next step, adding another FeatureReader to read the data from the featureclass which you tested.


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