14

In FME, is there a way to connect multiple readers to a single transformer? I'm using FME 2015 and want to clip a bunch of feature classes to a single feature, but can't seem to find an easy way to do this.

EDIT: Trying to select multiple features types from input dataset and link them all to a single transformer without having to click individual output arrows on the feature types and link to the input arrows on the transformer.

EDIT 2: Here's a screenshot, hopefully this will help:

Screenshot of what I'm trying to do

  • WorkspaceRunner? Anyway, search on batch processing. If I'm misunderstanding what you want to do, please edit your question. – mkennedy Feb 20 '15 at 17:38
  • FeatureReader will do this docs.safe.com/fme/html/FME_Transformers/… – Mapperz Feb 21 '15 at 5:08
  • I edited your text a little. I think you mean "feature types" - the objects on the canvas that represent layers/tables in the source dataset. – Mark Ireland Feb 23 '15 at 15:32
15

It's not a very well-known feature, but you need the Feature Type Connections window. You access it like this (View > Windows > Feature Type Connections):

enter image description here

In there select all the source feature types, select the transformer point to connect to, then click Connect:

enter image description here

  • Mark, thanks for your suggestion but I think I spoke too soon earlier. The functionality you mention is useful, but only for connecting individual attributes within a feature, to attributes within a new feature, right? I hope my terminology is correct! – denim_dan Feb 24 '15 at 19:35
  • 1
    Correction: Mark, after speaking with a co-worker and showing him the problem, he showed me how to make your method work. Thanks! – denim_dan Feb 24 '15 at 21:07
  • Great. Glad it helped. Yes, there is one dialog for attributes and another for features. Perhaps you had the wrong one? And don't worry about terminology. I write our training materials so it's my job to be obsessive about things like that ;-) – Mark Ireland Feb 24 '15 at 21:58
5

I just came across this old question and wanted to update it with a new answer. My previous answer still stands (and is still useful in some cases), but a quicker way now (FME2016+) is to select all of the source feature types and add the transformer with Quick Add.

enter image description here

Then all of the feature types are automatically connected to the transformer.

1

There is a transformer called feature type filter that is useful for what you are describing.

For example you can connect 10 different readers to a clip transformer, connect the clip transformer to the feature type filter transformer, and then once the feature type filter is updated, connect each individual feature to the desired outputs.

You would connect your output to the feature type filter and then open up the transformer and click update, then connect each output to its desired writer.

0

I really like Mark's answer. Indeed a feature not well known, at least not to me :). However, judging by Dan's screenshot, I think there is a more straight-forward solution. When you add that many readers in the same format, simply check the Single Merged Feature Type option in the Add Reader window (see below). All your files will then be displayed as if it were a single one.

AddReader: Single Merged Feat Type

If you want to write them back as individual files, you can add an AttributeExposer to your workbench and select fme_basename. Subsequently, you select this attribute as the one to use for Fanout by Attribute in your writer's Properties (see below). Note that this one is only helpful when you want to perform the same operation on all of the readers, although there are ways around that as well if you have to.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.