nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Payne <>
Subject Re: Put Database record
Date Wed, 20 Dec 2017 20:05:08 GMT

You'll only be able to update a given value once. So you could string together two UpdateRecord
in a row, or in this specific case you could instead use a replaceRegex function, such as:



On Dec 20, 2017, at 2:44 PM, Aruna Sankaralingam <<>>

Should I create another variable like the highlighted one below?


From: Aruna Sankaralingam []
Sent: Wednesday, December 20, 2017 10:41 AM
Subject: RE: Put Database record


I did as you suggested and it worked. If I want to remove or replace more than one character,
can I do it in the same statement?
For ex: I want to replace ‘,’ and ‘-‘ with ‘’ for the same field.

From: Mark Payne []
Sent: Thursday, December 14, 2017 12:00 PM
Subject: Re: Put Database record


You would need to remove the commas from the number. The easiest way to do that is probably
to use
an UpdateRecord processor before the PutDatabaseRecord. In that processor, you would want
to use a
schema that either declares the field as a "string" or uses a union like:

{ "name" : "NUMBER_OF_PRESCRIBERS", "type": [ "int", "string" ] }

Then, in UpdateRecord you would add properties such as:


That would strip out any commas for you. It looks like you would need to do the same for each
of the fields
here that you are declaring as an "int"


On Dec 14, 2017, at 11:15 AM, Aruna Sankaralingam <<>>

I am getting this error when I am trying to load a csv to redshift. I guess its because I
declared that as an INT in AvroSchema and the value has a “,”. If so, how do I make it
accept that as an integer?




View raw message