Deriving Destination Schema from Schema Feature
You can use a dynamic writer to define your destination schema. In dynamic mode, the writer checks the first feature of each incoming feature type 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.
To generate this list, use any of the following:
- The <Schema> output port of the FeatureReader transformer.
- AttributePivoter transformer
- Schema (Any Format) reader
Alternatively, you can build your own schema feature. For requirements, see Schema Feature Requirements, below.
To use the list to define destination schema, set the Schema Sources parameter of the dynamic writer's feature type to "Schema from Schema feature".
For a detailed example, including sample workspaces, see Dynamic Workflows: Destination Schema is Derived from a Schema Feature in the FME Community.
Schema Feature Requirements
A schema feature is comprised of a list, named attribute, and the following attributes:
Attribute Name |
Description |
Example |
Required? |
---|---|---|---|
name | Name of the attribute for the feature type. | attribute{0}.name | Yes |
fme_data_type | FME data type of the attribute. | attribute{0}.fme_data_type | Yes |
native_data_type | Data type of the attribute specific to the source format. | attribute{0}.native_data_type | Include only if you want to specify a format-specific data type. |
A second list, named fme_geometry, is required for writer formats that require separate feature types for each unique geometry. The list element value is the fme_type attribute value for the geometry. For example: fme_geometry{0} may have a value of "fme_point" and fme_geometry{1} may have a value of "fme_line".
SourceSansPro-ExtraLightItalic.ttf