FME Transformers: 2024.2

Categories
Attributes
Format Specific
Workflows
Related Transformers
AttributeCreator
AttributeFileWriter
AttributeManager
FeatureReader
FeatureWriter
GeometryExtractor
GeometryReplacer
PointCloudExtractor
PointCloudReplacer
RasterExtractor
RasterReplacer

AttributeFileReader

Reads the contents of an external text or binary file and attaches it to a feature as the value of an attribute.

Jump to Configuration

Typical Uses

  • Attaching files to features
  • Adding file contents to features
  • Reading geometry content stored in a separate file

How does it work?

The AttributeFileReader receives any type of feature and adds the contents of an external file to them, as the value of a new or existing attribute.

File selection may be done explicitly or by attribute value, expression, user parameter, or conditional value.

The file may be text or binary. (Text refers to the file type, rather than the file content - it may not necessarily be plain text.) A variety of encoding choices are available for text files. Binary files should be designated as Binary (fme-binary), as the transformer is not aware of formats and will simply preserve the file contents as a Blob.

There is no file size limit. Very large files may affect performance, and need sufficient memory to hold them as no file caching is done.

Examples

Usage Notes

  • All types of binary files are stored as Blobs, and Source File Character Encoding should be set to Binary (fme-binary) .
  • The most common text encodings are Windows Latin-1 (windows-1252) and Unicode 8-bit (utf-8).
  • If a text file includes special characters, the appropriate Source File Character Encoding should be selected to preserve those characters.
  • Full path names can be created from existing attribute values by using the Text Editor to create an expression.
  • Some transformers (such as the XMLFlattener) can read external files, and so do not need to use an AttributeFileReader first.

Configuration

Input Ports

Output Ports

Parameters

 

Editing Transformer Parameters

Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.

For more information, see Transformer Parameter Menu Options.

Reference

Processing Behavior

Feature-Based

Feature Holding

No

Dependencies None
Aliases  
History  

FME Community

The FME Community has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.

Search for all results about the AttributeFileReader on the FME Community.

 

Examples may contain information licensed under the Open Government Licence – Vancouver, Open Government Licence - British Columbia, and/or Open Government Licence – Canada.