Editing Reader Feature Types

A reader feature type represents an existing set of data. These feature types are defined when the workspace is generated or when the reader is being added.

Its dialog includes a number of options for managing how the data is read. It also includes a representation of the data schema, which (unless you are an advanced FME user), you will not typically need to edit.

Displaying Feature Type Parameters and Attributes

To display the Feature Type dialog, do one of the following:

  • Double-click the feature type.
  • Click the gear icon above 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.

Parameters

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.

General

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.

Other Parameters

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.

User Attributes

Attributes to Read

Note  User attributes 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.

Attribute Definition

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 Writer from 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.

Format Attributes

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 FME 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.