Question

What's wrong with the AttributeExposer? It can't expose fme_basename or fme_dataset any more.

  • 18 November 2017
  • 11 replies
  • 20 views

Userlevel 4
Badge +13


11 replies

Userlevel 4
Badge +13

Version 1 of the AttributeExposer (FME 2017.0+) actually works as it should - it merely exposes attributes already on features to FME Workbench. Version 0 (FME 2016 and earlier) actually added (or created) the attributes fme_basename and fme_dataset on every reader, even if the user exposed a different attribute, e.g. fme_geometry, and the connection to the AttributeExposer was disabled.

The best solution for FME 2017+ is to expose fme_basename and fme_dataset on the readers only if you need them. To learn how to expose any attributes on more than one reader, see https://knowledge.safe.com/questions/49944/expose-format-attributes-such-as-fme-basename-for.html

Userlevel 2
Badge +17

Version 1 of the AttributeExposer (FME 2017.0+) actually works as it should - it merely exposes attributes already on features to FME Workbench. Version 0 (FME 2016 and earlier) actually added (or created) the attributes fme_basename and fme_dataset on every reader, even if the user exposed a different attribute, e.g. fme_geometry, and the connection to the AttributeExposer was disabled.

The best solution for FME 2017+ is to expose fme_basename and fme_dataset on the readers only if you need them. To learn how to expose any attributes on more than one reader, see https://knowledge.safe.com/questions/49944/expose-format-attributes-such-as-fme-basename-for.html

Hi @DanAtSafe, so far I found that these format readers are missing the Schema Attributes (Additional Attributes to Expose) parameter (FME 2017.1.1.1).

 

  • Wavefront OBJ
  • OpenSceneGraph OSGB/OSGT
Therefore, if you are going to read them with FeatureReader, there is no way to add "fme_basename" and "fme_dataset" to the features.

 

Hope every format will have the Schema Attributes parameter without exception.

 

Userlevel 4
Badge +13
Hi @DanAtSafe, so far I found that these format readers are missing the Schema Attributes (Additional Attributes to Expose) parameter (FME 2017.1.1.1).

 

  • Wavefront OBJ
  • OpenSceneGraph OSGB/OSGT
Therefore, if you are going to read them with FeatureReader, there is no way to add "fme_basename" and "fme_dataset" to the features.

 

Hope every format will have the Schema Attributes parameter without exception.

 

Hi @takashi The FeatureReader was recently fixed in the latest 2018 betas FYI, PR79829

 

Userlevel 2
Badge +17
Hi @DanAtSafe, so far I found that these format readers are missing the Schema Attributes (Additional Attributes to Expose) parameter (FME 2017.1.1.1).

 

  • Wavefront OBJ
  • OpenSceneGraph OSGB/OSGT
Therefore, if you are going to read them with FeatureReader, there is no way to add "fme_basename" and "fme_dataset" to the features.

 

Hope every format will have the Schema Attributes parameter without exception.

 

Hi @DanAtSafe, I wasn't able to find any relevant update in the latest FME 2018.0 beta build 18208.

 

See the attached workspace that illustrates the issue I mentioned: b18208-expose-fme-basename-and-fme-dataset.fmwt (FME 2018.0 beta build 18208)In addition, currently I cannot access FME 2018.0 Change Logs for FME Desktop. Please check this URL.

 

https://downloads.safe.com/fme/beta/whatsnew_2018_0.txt
Userlevel 2
Badge +17
Hi @DanAtSafe, I wasn't able to find any relevant update in the latest FME 2018.0 beta build 18208.

 

See the attached workspace that illustrates the issue I mentioned: b18208-expose-fme-basename-and-fme-dataset.fmwt (FME 2018.0 beta build 18208)In addition, currently I cannot access FME 2018.0 Change Logs for FME Desktop. Please check this URL.

 

https://downloads.safe.com/fme/beta/whatsnew_2018_0.txt
Hi @MattAtSafe, thanks for your notification. I confirmed the options are available in the latest 2018 beta build 18220. Good to see that :-)

 

I do not believe in that "The best solution for FME 2017+ is to expose fme_basename and fme_dataset on the readers only if you need them". Adding attribute exposer is a good visual indicator that some other but just user attributes are used in the workspace. Same with adding reprojector instead of/in addition to just setting writer to a different coordinate system than the reader has. Such things improve perception of workspace design.

Badge +7

I am using FME 2020 (Build 20218) and I find that if I expose the fme_basename and fme_dataset in the Reader Feature Type they are read normally and have no issue, however I am curious why if I use an AttributeExposer to expose those attributes in the workspace, the values for these attributes are exposed with null values. What is causing the AttributeExposer to remove the values when it exposes these format attributes?

 

image.png

Userlevel 2
Badge +10

Hi @gmbutler2​, what format are you trying to read, and are you using the FeatureReader or just a regular Reader? As mentioned above, the best practice in this case is to expose these attributes on the Reader itself only when you need them.

Badge +7

Hi @gmbutler2​, what format are you trying to read, and are you using the FeatureReader or just a regular Reader? As mentioned above, the best practice in this case is to expose these attributes on the Reader itself only when you need them.

I'm reading a Microsoft Excel File. I exposed the fme_basename to use as a filename and I expose the fme_feature_type of the original file to set the sheet name so that when I run my workspace I can just plug and play with the files to get my desired results.

Userlevel 2
Badge +10

I'm reading a Microsoft Excel File. I exposed the fme_basename to use as a filename and I expose the fme_feature_type of the original file to set the sheet name so that when I run my workspace I can just plug and play with the files to get my desired results.

@gmbutler2​ As my colleague mentioned above, some changes were made where the only way to do this is to expose the attributes on the Reader. If they aren't exposed then FME will save space by not reading in the Format attributes (fme_basename for example), which is why the attributes have no value when exposed with the AttributeExposer. Hope this clears things up a bit.

Badge +7

I'm reading a Microsoft Excel File. I exposed the fme_basename to use as a filename and I expose the fme_feature_type of the original file to set the sheet name so that when I run my workspace I can just plug and play with the files to get my desired results.

Yeah I saw that. I did see something interesting. When reading my excel file I had the data go into a bulkattributerenamer and after it went through it the vaule for the fme_dataset and fme_basename were lost. I had to get around it by using an attributecreator first thing and use the exposed basename and dataset attributes to create new attributes. The new attributes retained the information throughout the workspace but the fme_basename and fme_dataset attributes still lost their values.

Reply