Skip to main content

Hi all, I'm trying to map fields to match a SQL table where some need to be Null and others are Not Null. As far as I can see, I've done this correctly in the 2 NullAttributeMapper Transformers (attached screenshots).

Basically I need some to be Null, and others to be Not Null. These have been separated in the screenshots below by 2 NullAttributeMappers.

 

I've attached the error as well, as this is proving to be quite tricky. Any help is appreciated.

Could it be that you've forgotten to add the error message?

 

Also, I think it could be helpful if you could post a screenshot of the data in Visual Preview's Table View from immediately after the NullAttributeMapper(s)


Hi red,

 

I've since attached them (been one of those days..weeks..possibly longer). You can see the difference between a Null value and a blank one, which is what the issue is - as it should be blank/empty, and not a Null


I'm not sure you can write an empty string into a smallint column? So I think that is your problem. FME is trying to be clever and convert the empty string to null but you can't insert a null as that is not allowed for that field either.


I'm not sure you can write an empty string into a smallint column? So I think that is your problem. FME is trying to be clever and convert the empty string to null but you can't insert a null as that is not allowed for that field either.

You may be onto something here. In the case I can't write an empty string there is there any way to get around it? I'll speak with our DBA team but I didn't know if a space or otherwise would suffice?


You may be onto something here. In the case I can't write an empty string there is there any way to get around it? I'll speak with our DBA team but I didn't know if a space or otherwise would suffice?

I suspect you will have to agree some sort of dummy integer value if nulls are not allowed


Reply