Set a variable for use in Pig Latin. This set will then be present for all subsequent Pig pipelines defined in this script. If you wish to set it for only a single Pig pipeline, use set within that definition. @param var variable to set @param value to set it to
(String var, String value)
| 153 | * @param value to set it to |
| 154 | */ |
| 155 | public static void set(String var, String value) throws IOException { |
| 156 | ScriptPigContext ctx = getScriptContext(); |
| 157 | PigServer pigServer = new PigServer(ctx.getPigContext(), false); |
| 158 | pigServer.getPigContext().getProperties().setProperty(var, value); |
| 159 | } |
| 160 | |
| 161 | /** |
| 162 | * Define a Pig pipeline. |
no test coverage detected