title: Replace string value to integer value in NiFi within a same column
body: <p>I want to replace a <em>'string value</em>' and enter that value as an <em>Integer Value</em> using Nifi ReplaceText. I do not know how to achieve this in NiFi.</p>
  
  <p>So my scenario is as follows:</p>
  
  <p>I will be having a CSV file with few fields with integers and few fields as total String values. For the fields that have a String value, I want to insert that as a pre-defined integer number into my database table. For Example:
  My CSV looks like the following:</p>
  
  <blockquote>
    <p><strong>Field1, Field2, Field3, Field4,Field5</strong></p>
    
    <p>1,2,<strong>abc</strong>,45,<strong>John</strong></p>
    
    <p>23,12,<strong>pqr</strong>,28,<strong>Sam</strong></p>
    
    <p>98,75,<strong>lmn</strong>,87,<strong>Smith</strong></p>
  </blockquote>
  
  <p>So now in MySQL table, the Field3 and Field4 have datatype as Integer, so before inserting the CSV into the Database I want to Change the string value into Pre defined Integer value I.e. For Field3 abc value should be entered into the MySQL Table as 0, pqr as 1, lmn as 2 and so on.... similarly the value in Field4 should be entered in the MySQL table as John as 10, Sam as 20 and Smith as 30...so my above csv should be stored as follows in my database:</p>
  
  <blockquote>
    <p><strong>Field1, Field2, Field3, Field4,Field5</strong></p>
    
    <p>1,2,<strong>0</strong>,45,<strong>10</strong></p>
    
    <p>23,12,<strong>1</strong>,28,<strong>20</strong></p>
    
    <p>98,75,<strong>2</strong>,87,<strong>30</strong></p>
  </blockquote>
  
  <p>I think I can achieve this with ReplaceText. But if there is any better way to achieve this That would be great. Because My CSV will have 1000+ columns and let's say 50+ columns would have a String value that I need to process and convert into a pre-defined integer value. Is it possible to achieve this in NiFi? </p>
  
  <p>If yes then what configs to set and what will be the best approach?</p>
  
  <p>Thank you!</p>