You are here: FME Workbench > Readers and Writers > Workspace Resources

Adding a Reader as a Resource

When you add a reader as a resource, you are inserting a reference to a dataset to be used in the workspace. This reader will not perform any actual data reading, except when up-to-date schema is required at runtime. When required, schema may be requested from that reader.

Currently, this option is only used by the writers that are configured to use Dynamic Parameters.

In the dynamic mode, a writer will extract schema information from one or more of the specified readers or reader resources to use during a translation. This feature is particularly useful when a writer needs to get the schema and features from several different datasets.

The difference between a Reader and a Reader Resource is that adding a Reader will also add all the associated feature types – a reader resource can be used as a source for schema without actually providing any feature types.

Setting up the Reader Resource

Select Readers > Add Reader as Resource or right-click Workspace Resources in the Navigator:

The process in Workbench is similar to adding a workspace Reader. You will need to select the dataset file (or group of files) that you want to add as a resource (FME can usually determine the format from the file extension, and will automatically populate the Format field). If required, specify any additional format parameters.

After you click OK, the log file will display the processing statistics associated with the selected dataset, and you will see a Translation SUCCESSFUL message, indicating that Workbench has successfully processed the dataset.

You will see an additional Workspace Resources parameter in the Navigator window:

This Reader will remain in the list as a resource of the workspace.

Setting up the Writer to use the Reader Resource

When you want to use the Reader in a translation, open the Writer Feature Type Properties. Clicking Dynamic Properties enables the Schema Sources and Schema Definition fields.

Click the Browse button beside the Schema Sources field to select from a list of existing schema readers. Only the readers that you have selected will be used at runtime.

Changing Dynamic Schema Properties

In most cases, you can use the default schema properties of the dynamic writer. However, there are some parameters you can adjust.

To display dynamic schema parameters, open the dynamic writer Feature Type Properties dialog, and click the Browse button beside Schema Definition:

See also

About Dynamic Workspaces