Skip to main content
FME Hub user bwn just uploaded a new transformer to the FME Hub.

AttributeTruncationChecker

This Transformer compares Workspace Features to separate Reference Schema Features to find and report where Attribute value string widths exceed the maximum widths of the Reference Schema(s) Attributes/Fields. This allows workflows to detect in advance which Features and Attribute values will likely be Truncated during Writing.

The Transformer must have input Reference Schema Feature(s), with it being recommended to use FeatureReader to generate these from a sample/production destination Schema. The workspace features being inspected must have either an Exposed Attribute set to values equal to the corresponding Feature Type Name value as the Schema Feature to compare against, or have this value able to be calculated through an FME expression, otherwise the Features will pass through the Transformer with no comparison/detection performed if it cannot match the inspected features feature type name to the same feature type name in the Reference Schema Features. This Feature Type Name must be used as the input to "Features to Check Feature Name"

For each Workspace Feature, each Attribute with the same Feature Type Name and the same Attribute Name as a Reference Schema Feature Attribute of a character type, has the Attribute value string length compared against the maximum width of the Reference Schema Attribute. This is done through Feature and Attribute iteration and comparison in PythonCaller and relies on the host environment being able to call Python and import fme, fmeobjects

The Transformer requires Reference Schema Feature(s) from either the Schema Port of a FeatureReader, or Schema Features with the same schema/format as as what is output from a FeatureReader Schema port.

If the string length of any checked Attribute value exceeds the maximum width of the Reference, the count of a Feature's Attributes with excessive width are added to the _wc_attr_count_excess_width Attribute and may be filtered/tested downstream for Features where this Count > 0.

User options include adding detailed report Lists, at the penalty of slower performance. The user may include the Feature Attribute string widths calculated for every reference character/text attribute in the Reference Schema to analyse for overall string width statistics, and/or add a separate List to only those Features/Attributes that exceed the Schema text field width limit.

A higher performance option to drop all Incoming Attributes allows to output the report Lists only, with a further option to keep Key Attributes in the output.



Would you like to know more? Click here to find out more details!