xamo
xamo

Reputation: 69

Trim values of csv in nifi

I'm processing csv file using nifi where I want to trim whitespaces before int values either using groovy script or replaceText processor. Any help will be appreciated.

Upvotes: 0

Views: 1306

Answers (1)

notNull
notNull

Reputation: 31550

You can use CsvReader/CSVSetWriter controller services to read/write the data and

Trim Fields true

  • Whether or not white space should be removed from the beginning and end of fields

    enter image description here

Refer to this link to how to configure/enable CsvReader/writer controller services.

(or)

You can use QueryRecord processor and add new query as a dynamic property to the processor as

select trim(field_name) from FLOWFILE

refer to this link for more details regarding to Query Record processor.

Upvotes: 3

Related Questions