Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

replace an empty values with "N/A" using replaceText processor

replace an empty values with "N/A" using replaceText processor

New Contributor

in the flowfile I have two attributes address and city, and both of them are returned empty. thank you for your help

3 REPLIES 3

Re: replace an empty values with "N/A" using replaceText processor

New Contributor

The format of the flowfile is Json

{

"Name": "XXX",

"Address": " ",

"city": " ",

"Country": "USA"

}

but I want it to show like this instead

{

"Name": "XXX",

"Address": "N/A ",

"city": " N/A",

"Country": "USA"

}

Re: replace an empty values with "N/A" using replaceText processor

Super Guru
@Sam LL

Search for white space in double quotes and replace that with "N/A"

79414-replacetext.png

Search Value

"\s"

Replacement Value

"N/A"

Character Set

UTF-8

Maximum Buffer Size

1 MB //needs to change this value according to your flowfile size

Replacement Strategy

Regex Replace

Evaluation Mode

Entire text

Re: replace an empty values with "N/A" using replaceText processor

New Contributor

@ShuThank you very much