Skip to main content
Solved

Is the processing of null and empty values with the SchemaScanner transformer correct?

  • September 20, 2023
  • 4 replies
  • 77 views

vogis
Contributor
Forum|alt.badge.img+2

Hello,

on the SchemaScanner transformer, in the data types section, there is a parameter to define the action to be taken for attributes with the value Missing/Null/Empty.

When ignore is selected, if an attribute has no entry, it is excluded from the schema. This seems correct for Missing. But is this the case for Null and Empty?

In the latter case, shouldn't the attribute remain in the data model?

If not, what other prossibility exists for retaining an attribute that has no value entry in the data model?

 

Best regards

Patrick

Best answer by nielsgerrits

The NullAttributeMapper can map fields having null or empty values a set value. Maybe this can help you to get the Schema feature as you want. You also can map the attributes back to empty or null after the SchemaScanner, to get the output as you want (being null or empty).

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

nielsgerrits
VIP
Forum|alt.badge.img+62
  • Best Answer
  • September 20, 2023

The NullAttributeMapper can map fields having null or empty values a set value. Maybe this can help you to get the Schema feature as you want. You also can map the attributes back to empty or null after the SchemaScanner, to get the output as you want (being null or empty).


virtualcitymatt
Celebrity
Forum|alt.badge.img+47

The NullAttributeMapper can map fields having null or empty values a set value. Maybe this can help you to get the Schema feature as you want. You also can map the attributes back to empty or null after the SchemaScanner, to get the output as you want (being null or empty).

This is a pretty nice approach - that is, if you're not happy with the default fme_data_type fme chooses


vogis
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • September 21, 2023

The NullAttributeMapper can map fields having null or empty values a set value. Maybe this can help you to get the Schema feature as you want. You also can map the attributes back to empty or null after the SchemaScanner, to get the output as you want (being null or empty).

That did the trick. Thanks for your help!

With a large number of input paths, this means I have to define a null NullAttributeMapper for each of them before the schemas are merged, which might not be ideal.


nielsgerrits
VIP
Forum|alt.badge.img+62

That did the trick. Thanks for your help!

With a large number of input paths, this means I have to define a null NullAttributeMapper for each of them before the schemas are merged, which might not be ideal.

Cheers :)