Skip to main content
Solved

remove attributes on read

  • March 23, 2017
  • 13 replies
  • 69 views

On the FME roadshow someone mentioned there was a way to remove attributes on the reader to improve performance. Unchecking attributes on the feature reader properties User Attributes just seems to hide them but reads these attributes anyway - eg. hidden attributes still appear in Data Inspector. See attached.

Best answer by takashi

The functionality has been introduced in FME 2017.0 for some formats, not for all formats. The Attributes to Read options appear on the User Attributes tab in the reader feature type if the reader supports the functionality. e.g. [CSV reader feature type in FME 2017.0]

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.

13 replies

itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • March 24, 2017

It is working for me...although the attributes are still available in the DI, they are no longer available in WB to manipulate, see also the table view in de DI.


david_r
Celebrity
  • March 24, 2017

The distinction between exposed (design-time) attributes and run-time attributes is a pretty common one. Unfortunately, unchecking attributes in the reader will only un-expose the attributes, i.e. they will no longer be visible when designing the workspace. But as you've seen, they're still being read when you execute the workspace.

If you have a lot of attributes on a reader it can slow the design of the workbench down, as each time you connect or disconnect something it has to re-validate the whole workspace, and for those cases it's true that disabling (un-exposing) unwanted attributes can help FME Workbench get more responsive when building your workspace. But it won't help the execution time, unfortunately.

It seems it's not possible to avoid reading all the attributes (short of using a SQLCreator or similar), FME is pretty insistent on reading them all, even if you've manually deleted them from the reader feature type.

You can of course remove unwanted attributes just after the reader (AttributeRemover, AttributeKeeper, BulkAttributeRemover), although it's not exactly the same.


itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • March 24, 2017

The distinction between exposed (design-time) attributes and run-time attributes is a pretty common one. Unfortunately, unchecking attributes in the reader will only un-expose the attributes, i.e. they will no longer be visible when designing the workspace. But as you've seen, they're still being read when you execute the workspace.

If you have a lot of attributes on a reader it can slow the design of the workbench down, as each time you connect or disconnect something it has to re-validate the whole workspace, and for those cases it's true that disabling (un-exposing) unwanted attributes can help FME Workbench get more responsive when building your workspace. But it won't help the execution time, unfortunately.

It seems it's not possible to avoid reading all the attributes (short of using a SQLCreator or similar), FME is pretty insistent on reading them all, even if you've manually deleted them from the reader feature type.

You can of course remove unwanted attributes just after the reader (AttributeRemover, AttributeKeeper, BulkAttributeRemover), although it's not exactly the same.

I think this is introduces in 2017, but cant find any written refenrence to it, well will have to wait for the fmewt to get confirmation on this.

 

Anybody from Safe would like to clarify the matter? @daleatsafe, @KenAtSafe

david_r
Celebrity
  • March 24, 2017
I think this is introduces in 2017, but cant find any written refenrence to it, well will have to wait for the fmewt to get confirmation on this.

 

Anybody from Safe would like to clarify the matter? @daleatsafe, @KenAtSafe
Before writing the above I tested with FME 2017.0, no such luck.

itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • March 24, 2017
Before writing the above I tested with FME 2017.0, no such luck.
previous answer was also created with 2017.0

 

 


takashi
Celebrity
  • Best Answer
  • March 24, 2017

The functionality has been introduced in FME 2017.0 for some formats, not for all formats. The Attributes to Read options appear on the User Attributes tab in the reader feature type if the reader supports the functionality. e.g. [CSV reader feature type in FME 2017.0]


david_r
Celebrity
  • March 24, 2017

The functionality has been introduced in FME 2017.0 for some formats, not for all formats. The Attributes to Read options appear on the User Attributes tab in the reader feature type if the reader supports the functionality. e.g. [CSV reader feature type in FME 2017.0]

This is notably absent from e.g. the GEODATABASE_FILE reader, which explains why I thought it hadn't been implemented yet :-)

erik_jan
Contributor
Forum|alt.badge.img+23
  • Contributor
  • March 24, 2017

If you are using an older version of FME (pre 2017) you can edit the Reader feature type after changing this setting:

After that you can remove the attributes from the Reader feature type.

This will speed up the reading for some formats (I tried it on ESRI GDB).


david_r
Celebrity
  • March 24, 2017

If you are using an older version of FME (pre 2017) you can edit the Reader feature type after changing this setting:

After that you can remove the attributes from the Reader feature type.

This will speed up the reading for some formats (I tried it on ESRI GDB).

Interesting, I tried that very same thing in FME 2017.0 and using an Inspector I still got all the feature attributes, including those I'd manually removed. Was using the FGDB reader.

erik_jan
Contributor
Forum|alt.badge.img+23
  • Contributor
  • March 24, 2017
Interesting, I tried that very same thing in FME 2017.0 and using an Inspector I still got all the feature attributes, including those I'd manually removed. Was using the FGDB reader.
@david_r Had a closer look and you are right. The removed attributes don't show in the table view, but are available in the feature information. Conclusion: the attributes are read, but not shown (exposed).

 


  • August 7, 2017

The functionality has been introduced in FME 2017.0 for some formats, not for all formats. The Attributes to Read options appear on the User Attributes tab in the reader feature type if the reader supports the functionality. e.g. [CSV reader feature type in FME 2017.0]

We have a custom reader/writer that we use for proprietary data format. Does anyone know how to "enable" or "implement" this functionally for a custom reader? @trentatsafe, do you know my chance on how to enable this for the custom reader that @egorbaykovnn

 

has been asking question about on adding the WHERE and SELECT options to the reader?

 


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • August 7, 2017

one day we will able to query all data types...

(a recurrent dream of mine)


tim_wood
Contributor
Forum|alt.badge.img+8
  • Contributor
  • August 24, 2017

I think that not exposing attributes effectively acts as an AttrributeRemover. I tested reading an FGDB layer and not exposing all the attributes. I then used AttributeCreator to create an Attribute with the same name as one of the non-exposed attributes. An inspection of the output shows that the created attribute has not picked up the values in the read but not exposed attribute of the same name.