Skip to content

Instantly share code, notes, and snippets.

@dphuang2
dphuang2 / script.js
Created August 20, 2016 21:31
Streamsets JS evaluator script
function stringToNum(number){
var out = parseFloat(number.toString().replace(',',''));
return out;
}
function outputRecord(record, indicator, country, date, value){
if(parseFloat(value).isNaN()){ // if the value is a string, then output value as string
record.value = {
'${ID}' : indicator.toString(),
'${CT}' : country.toString(),
'${DT}' : parseInt(date),
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
@dphuang2
dphuang2 / .bashrc
Last active November 26, 2018 22:08
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac