Adding and Copying Attributes
How to add a new attribute to a feature type:
- Double-click a writer feature type. (You can also click the gear icon in the pop-up toolbar and then click the User Attributes tab.)
- Under Attribute Definition, select Manual.
- Enter the name of the attribute and use the tab key to move through the Type, Width, Precision, Value, and Index fields. You can enter or change the default values provided in these fields, or continue to enter more attribute names.
- Click OK.
- Connect the attribute with its source.
Warning Avoid naming user attributes with the prefix fme_. FME may not recognize a user attribute prefixed with fme_ because FME uses this prefix to process many format attributes. As well, to prevent similar conflicts, avoid naming user attributes with the same names as other format attributes.
Note To quickly rename an attribute without reopening the dialog, float the cursor over an attribute name (you will see a highlight), right-click and select Rename.
Copying Attributes
You can also copy attributes from another feature type or a transformer. This is a useful function if you have many attributes to duplicate:
- Select the writer feature type, right-click and select either Copy Attributes From Feature Type… or Copy Attributes From Transformer.
- In the dialog that appears, select either a feature type or a transformer from the pull-down list.
- Click OK.
All the attributes will be copied to the selected feature type.
Tip Use the Attribute Connection feature to quickly connect reader and writer feature type attributes. To open the Attribute Connections pane in FME Workbench, select View > Windows > Attribute Connections.