Open
Introduce New Transformer to Modify Schema Easily
Since the FeatureReader has been enhanced in FME 2015.1 (the <Schema> port added), dynamic schema configuration has become more flexible than before.
To expand the application range, I would suggest a new transformer which allows users to modify schema contents - attribute names and data types stored in the "attribute{}" list easily.
The transformer receives schema features, modifies the contents, and then outputs resulting schema features. Required functionalities should be:
- rename attributes (string replace, regex replace)
- add a common prefix/suffix to attributes matching specified condition (or all)
- remove specified prefix/suffix from attributes matching specified condition (or all)
- change case of attributes matching specified condition (or all)
- remove attributes matching specified condition (exact match, starting with, ending with, regex match)
- replace data type of attributes matching specified condition (name and/or original data type)
- add attributes (pairs of name and data type)
more?
The important thing is that the transformer should be a feature-based one. Since every schema feature read by the FeatureReader will have to arrive in the dynamic writer feature type (Schema Sources: "Schema from first feature") before any data feature belonging to the same feature type. If it wasn't so, the worth would be a half.
If the "all in one" would be too complicated, divide the functionalities into 2 - 3 parts, and multiple transformers may be defined for each part.
To expand the application range, I would suggest a new transformer which allows users to modify schema contents - attribute names and data types stored in the "attribute{}" list easily.
The transformer receives schema features, modifies the contents, and then outputs resulting schema features. Required functionalities should be:
- rename attributes (string replace, regex replace)
- add a common prefix/suffix to attributes matching specified condition (or all)
- remove specified prefix/suffix from attributes matching specified condition (or all)
- change case of attributes matching specified condition (or all)
- remove attributes matching specified condition (exact match, starting with, ending with, regex match)
- replace data type of attributes matching specified condition (name and/or original data type)
- add attributes (pairs of name and data type)
more?
The important thing is that the transformer should be a feature-based one. Since every schema feature read by the FeatureReader will have to arrive in the dynamic writer feature type (Schema Sources: "Schema from first feature") before any data feature belonging to the same feature type. If it wasn't so, the worth would be a half.
If the "all in one" would be too complicated, divide the functionalities into 2 - 3 parts, and multiple transformers may be defined for each part.
Reply
Rich Text Editor, editor1
Editor toolbars
Press ALT 0 for help
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.