A Reader feature type represents an existing set of data. Its dialog includes a number of options for managing how the data is read. It also includes a representation of the data schema, which generally you will not need to edit.
Displaying Feature Type Parameters and Attributes
To display the Feature Type dialog, do one of the following:
- Click the gear icon on the upper right of the feature type
- Right-click on a feature type and select Properties from the menu.
- On the menu, select View > Windows > Parameter Editor. To view the feature type in the editor, select it on the canvas or in the navigator.
Just like Readers, feature types have their own set of parameters that control how that feature type (for example, layer, table, sheet) is being read. These parameters apply only to a single feature type, whereas a Reader parameter applies to all feature types. Feature type parameters provide a degree of individual control over reading different layers or tables.
Edit the feature type name, if desired. Changing this value is rarely necessary because it is meant to reflect (and acts as a filter to) a layer of data in the existing dataset. However, it can be useful when, for example, you are setting up a workspace and do not have access to the original source data.
Note that this capability is not permitted unless you activate it using Tools > FME Options > Workbench > Allow reader feature type editing. Some formats of data specifically disallow such edits.
Merge Feature Type
For reader feature types, you can specify Merge properties.
Some readers display other parameters to control specific aspects of how the data is read. For example, when reading some database formats, there is a Feature Type parameter that defines the name of the spatial column to read.
This is a Feature Type parameter because each table might have a different geometry column name, and therefore each feature type needs a way to define it.
Attributes to Read
Note: These options are not available for all formats.
These options allow you to specify the attributes that are read when the workspace is run. Limiting attributes that are read can improve performance, reduce memory consumption, and make workspaces less cluttered.
- All Attributes – Read all the attributes found in the source data when the workspace is run. The attributes read can differ from those displayed under 'Attribute Definition' (see below).
- Exposed Attributes – Read only the attributes that are checked in the Exposed column in the Attributes Definition table.
This table shows the structure of the source data, including attribute names and their types.
Attributes that are checked under Exposed are shown on the canvas and can be referenced from downstream transformers and writer feature types. Additionally, the structure of the source data can be duplicated on a writer feature type through various options including: Copy from Reader… in the Add Writer dialog, Duplicate on Writerfrom the reader feature type's context menu, and Copy Attributes From Feature Type from the writer feature type's context menu.
Unchecked attributes are hidden in the workspace, but are still read at runtime, unless 'Attributes to Read' is set to Exposed Attributes.
This table automatically populates when you add a new reader. If the structure of the source data has changed or is no longer current, you can update it through the menu Readers > Update Feature Types.
For advanced scenarios, you can enable the ability to edit the Attribute Definition table. To activate this ability, click Tools > FME Options > Workbench > Allow reader feature type editing.
Note: Some readers do not support editing the Attribute Definition table, regardless of this setting.
These are built-in FME attributes that you can "expose" or make visible so that you can set them to particular values and connect them to other format-specific attributes. Apply to... exposes the attributes for multiple, selected feature types.
When you select (expose) an attribute on the reader side, it allows its value to be used in the workspace.
If you deselect an attribute, the attribute will no longer be exposed, but it will still be carried on the feature (even though it will be hidden from Workbench schemas).
Note: In order for attributes fme_basename and fme_dataset to be read, they must be explicitly exposed in the reader feature type or the FeatureReader transformer.
To learn more about working with format attributes, see Controlling Features with Format Attributes.
- To open the Change Multiple Feature Types dialog, do one of the following:
- In the Feature Type dialog, click Apply To.
- In the Parameter Editor, click the Change Multiple Feature Types icon .