Of course, I can use the AttributeManager and then for every Attribute having that issue creating a new Attribute with a slightly different name using a condition to set the value, but that's not what I want...
The condition would like to be:
@StringLength(@Value(FIELDNAME)) = 254
And in that case, give it a default value.
And if it is not 254 characters, then add the value of the 'wrong' Attribute.
But if there are 254 characters representing a right string or value, then this condition doesn't make sense.
I guess that the field has been filled with 254 spaces. Try removing all spaces from the attribute value with the AttributeTrimmer.
I guess that the field has been filled with 254 spaces. Try removing all spaces from the attribute value with the AttributeTrimmer.
Thanks @takashi for your reply, but unfortunately that doesn't work... inspecting the value of the Shapefile doesn't come up with anything. It's empty/empty so to say. But in FME not recognized as a NULL, Missing Value, or whatever so far...
I guess that the field has been filled with 254 spaces. Try removing all spaces from the attribute value with the AttributeTrimmer.
Is the length of the attribute value still 254 after trimming?
Hi @harmen1,
I stumbled across this post whilst researching a similar issue and hopefully have some answers for you.
If you use an AttributeEncoder on these attributes and set the Destination Encoding to binary does this return a value of 254 zeros? These represent null bytes, these are not printable which is why in a logger or inspector the attribute value looks like an empty string but, as proved by the StringLengthCalculator in fact it is not - which is why your NullAttributeMapper is not working as expected.
Perhaps you could use the Attribute Encoder Output to fix these - as if they do contain a true value the output will be different so you can use that in your test condition rather than the string length.