title: Add two columns together using apache-nifi
body: <p>I have following scenario. I one database table I have :</p>
  
  <pre><code>| id | name | basic_salary | allowance |
  _______________________________________|
  | 1  | sach | 2000         | 1000      |
  | 2  | nala | 5000         | 2500      |
  |______________________________________|
  </code></pre>
  
  <p>add <code>basic_salary</code> and <code>allowance</code> togther and making it as <code>net_salary</code> and insert to a new table called <code>net_salary</code></p>
  
  <p>For first step, I used <code>ExecuteSQLRecord</code> processor and can get all the records. But problem is : How to add those two columns coming in flowfile.</p>
  
  <p>So final result should be :</p>
  
  <pre><code>| id | name | net_salary |
  |________________________|
  | 1  | sach | 3000       |
  | 2  | nala | 7500       |
  </code></pre>
  
  <p>This is directly related to <a href="https://stackoverflow.com/questions/58974062/replace-a-value-with-a-variable-from-flowfile-using-apache-nifi/58976236#58976236">my previous variable question</a>. 
  How to handle flowfile variables to perform operations in <code>apache-nifi</code>?</p>
  
  <p>I used <a href="https://stackoverflow.com/questions/15719557/how-to-compute-the-sum-of-multiple-columns-in-postgresql">How to compute the sum of multiple columns in PostgreSQL</a> inside <code>ExecuteSQL</code> processor, but it can not understand flowfile variables.</p>