node.js - running pig script -


i have pig script , sample application written in node.js. wanted run pig script node.js.

i have not used node.js. here find link show how execute unit command in node.js: http://www.dzone.com/snippets/execute-unix-command-nodejs

for example, if want run pig script called foo.pig. can try following code:

var sys = require('sys') var exec = require('child_process').exec; function puts(error, stdout, stderr) { sys.puts(stdout) } exec("pig -f foo.pig", puts); 

you can replace pig -f foo.pig command use run pig script.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -