Solved

remove attributes on read


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.

icon

Best answer by takashi 24 March 2017, 08:48

View original

13 replies

Badge +16

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.

Userlevel 4

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.

Badge +16

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
Userlevel 4
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.
Badge +16
Before writing the above I tested with FME 2017.0, no such luck.
previous answer was also created with 2017.0

 

 

Userlevel 2
Badge +17

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]

Userlevel 4

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 :-)
Userlevel 2
Badge +12

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).

Userlevel 4

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.
Userlevel 2
Badge +12
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).

 

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?

 

Badge +3

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

(a recurrent dream of mine)

Badge +7

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.

Reply