Managing Attributes
A high proportion of the top 25 transformers are support transformers for managing attributes. These create new attributes, rename them, set values, and delete them.
A key use for these transformers is to rename attributes for the purpose of schema mapping.
Attribute Managing Transformers
The key attribute-management tasks and the transformers that can be used are as follows:
Task | Transformers |
---|---|
Create Attributes | AttributeCreator, AttributeManager |
Set Attribute Values | AttributeCopier, AttributeCreator, AttributeManager, AttributeRenamer |
Remove Attributes | AttributeKeeper, AttributeManager, AttributeRemover, BulkAttributeRemover |
Rename Attributes | AttributeManager, AttributeRenamer, BulkAttributeRenamer |
Copy Attributes | AttributeCopier, AttributeCreator, AttributeManager |
Sort Attributes | AttributeManager |
Change Attribute Case | BulkAttributeRenamer |
Add Prefixes/Suffixes | BulkAttributeRenamer |
Many of these transformers can carry out similar operations, and you can see that the AttributeManager does so many tasks you can use it almost exclusively.
WARNING |
Don't misunderstand the BulkAttributeRenamer. It changes the case - or adds suffixes/prefixes - to the attribute name, not the attribute value. |
Lists
A List in FME is a mechanism that allows multiple values per attribute.
For example, the attribute myAttribute can only contain a single value.
However, the list attribute myList{}.myAttribute can contain multiple values as:
myList{0}.myAttribute myList{1}.myAttribute myList{2}.myAttribute etc.
There are various transformers designed to operate specifically on lists - they can be found in the Lists category of the transformer gallery - and list functionality is built into other transformers (such as the AttributeCreator) too.
For further reading check out this article on Attribute Management on the Safe Software blog.