Skip to main content
Question

How to get rid of "N/A" from Reader to Writer; while N/A is within the main data list


seasonishere_20

I have a dataset where in some column the numbers are "N/A" and that attribute is in char. Which transformer I can use, so that it can read N/A and gives me N/A in writer.

4 replies

Forum|alt.badge.img+2

@seasonishere_20 You can use the NullAttributeMapper to set the default value of a set of different attributes. Use the Of If Attribute Value Is: parameter.


nampreetatsafe
Safer
Forum|alt.badge.img+13

Hi @seasonishere_20: Welcome to the FME Community! Your question title indicates that you want to get rid of the N/A, while your description indicates you want to keep the N/A in your destination.

If you want to get rid of N/A and have a consistent null value in your destination for any N/A from the reader try using the NullAttributeMapper to replace the N/A with a null value:


seasonishere_20

Thank you for your reply @nampreetatsafe and @markatsafe

I am definitely gonna those out.

Also, want to get your attention, if the following is okay?

I have used String Replacer for this. Do you think this is also okay? As this also gave me <null> value at the end, which is my goal.


Forum|alt.badge.img+2
seasonishere_20 wrote:

Thank you for your reply @nampreetatsafe and @markatsafe

I am definitely gonna those out.

Also, want to get your attention, if the following is okay?

I have used String Replacer for this. Do you think this is also okay? As this also gave me <null> value at the end, which is my goal.

@seasonishere_20 StringReplacer is fine - but it doesn't set a <null> value, just an empty string. If you're writing to a database, you probably want to use a <null> value.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings