fmeobjects.FMEFeature.setAttribute

FMEFeature.setAttribute(attrName, attrValue)

Supply a new attribute for the feature. If the attribute already exists, it will be overwritten. The following type numeric mappings are used:

PyInt ==> FME_Int32

PyFloat ==> FME_Real64

PyLong ==> FME_Int64

Binary values are to be specified as bytes or bytearray values.

If an attribute value of None is specified, the attribute value will be set as an empty string. To set a null attribute, use setAttributeNullWithType.

For a list attribute, if the attribute already exists and contains more elements than the new list, the resulting list will be made up of the new list elements plus the old list elements that were not overwritten. Call removeAttribute first to avoid this behavior. Passing an empty list for the attribute value will have no effect.

Parameters:
Return type:

None