About Dynamic Workspaces
Dynamic workspaces provide maximum translation flexibility and minimize long-term maintenance of workspaces.
Dynamic means that the workspace is set up very simply, but with maximum flexibility. You can read any source dataset (of the chosen format), and it will be read and written (to the destination format) correctly. The important part is that you can change the source to a different dataset, and it will still work.
Why Create Dynamic Workspaces?
Traditional FME Workspaces are tightly bound to the source and destination schemas. In many cases, this is what you want. However, in certain situations, the workspace needs to be more independent of the schemas.
A dynamic workspace breaks the dependence on the source and destination schema. Common applications for dynamic workspaces are:
- When a relatively simple data transformation can apply to all the data regardless of schema (that is, clipping, coordinate transformation).
- When the source schema is not predictable or well-defined.
- Ad hoc data transformations.
- When the destination format might vary.
- Long-term maintenance of the workspace is required.
What can be made Dynamic
There are a number of components that you could make dynamic in an FME workspace:
Schema: Source Feature Types
A workspace that reads any set of feature types from a source dataset.
This is supported by the Merge Filter and Adding a Reader as a Resource.
Schema: Destination Feature Types
A workspace that reads any set of feature types from a source dataset, and writes a corresponding set of feature types.
A workspace that reads any set of attributes on the source feature types and writes them out in the same schema.
A workspace that writes to any format, without the need to add multiple writers.
This is supported by the Generic Writer.
Working with Dynamic Schemas
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 writer Feature Type dialog.
Dynamic Schema Definition
To view, check the Dynamic Schema Definition box.
Schema Sources: Click the Browse button to select from a list of existing schema readers. Only the readers that you have selected will be used at runtime. If Schema from Schema Feature is selected, the writer checks the first feature for the presence of a specific type of list attribute that provides schema information. If this list is found on the first feature, it can be used to generate the output schema for the writer. For more information, see Deriving Destination Schema from Schema Feature.
Schema Definition Name: Defines how elements in the schema definition of the feature type are named. By default, schema elements are named based on the feature type name, under General Parameters. Alternatively, you can name schema elements based on a specified attribute.
Attributes to Remove: This option allows you to remove attributes from the feature. Click the ellipsis (...) and enter the names of any attributes you do not want in the destination feature (for example, OBJECTID, SHAPE_Area, and any others).