 <p>Strictly speaking, this is not exacly a Scalding question but you can use something like <a href="http://commons.apache.org/proper/commons-jexl#A_Brief_Example" rel="nofollow">Apache Commons JeXL</a> to execute formulas dynamically. So you would read the formula from the 2nd file, give it first file record object as a context and execute it.</p>