Skip to main content
Question

Exclude wildcard on reader

  • February 19, 2018
  • 4 replies
  • 76 views

jdh
Contributor
Forum|alt.badge.img+40

I have two files in a common directory with the following naming scheme

{Know prefix}_{variable suffix}

 

{Know prefix}_{known infix}_{variable suffix}

ex.

ABC_123

 

ABC_XYZ_123

Is there an easy way to read in only the file without the infix? The standard wildcard {prefix}* will pick up both files. Currently I'm testing the fme feature type to see whether or not it contains the infix, but ideally I would like to not even read it in.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • February 20, 2018

Heya @jdh,

 

Excellent question - Just thinking about a workaround which popped into my head, while it's inconvenient Would the PATH reader followed by FeatureReader be an option here for you?

takashi
Celebrity
  • February 20, 2018

Why not use a regular expression? (Filter Type: Regular Expression)

^[^_]+_[^_]+$

0684Q00000ArKrxQAF.png


jdh
Contributor
Forum|alt.badge.img+40
  • Author
  • Contributor
  • February 20, 2018

Why not use a regular expression? (Filter Type: Regular Expression)

^[^_]+_[^_]+$

0684Q00000ArKrxQAF.png

My understanding is the Merge Filter is applied after the dataset is read (discarding features that don't match the filter expression),  I'm looking to completely avoid reading in the data.

 

 


takashi
Celebrity
  • February 20, 2018

Why not use a regular expression? (Filter Type: Regular Expression)

^[^_]+_[^_]+$

0684Q00000ArKrxQAF.png

I think that there is no way to do that in the current FME. I would use the PATH reader, a filter transformer and a FeatureReader, as @MattAtSafe suggested.