Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig, mail # user - Pig Parameter Substitution


+
Siddhi Mehta 2013-09-16, 21:22
Copy link to this message
-
Re: Pig Parameter Substitution
Ruslan Al-Fakikh 2013-09-16, 22:54
Hi,

No sure whether it helps, but I did a lot of testing in such cases. "Test
and see" was my main approach. It is really tricky sometimes. Also you can
try the -dryrun option when launching pig.

Best Regards,
Ruslan Al-Fakikh
https://www.odesk.com/users/~015b7b5f617eb89923
On Tue, Sep 17, 2013 at 1:22 AM, Siddhi Mehta <[EMAIL PROTECTED]> wrote:

> Hey All,
>
>
> How does pig deal with handling null param values.
> Should there be an exception on null param value?
> Currently it just translates it to String null
>
> e.g
>
>         InputStream queryStream = IOUtils.toInputStream("A = LOAD '$VAL'
> using PigStorage()", "UTF-8");
>         Map<String, String> paramMap = Maps.newHashMap();
>         paramMap.put("PARAM", null);
>         try {
>             pigServer.registerScript(queryStream, paramMap);
>             fail();
>         } catch (Exception e) {
>             // should come here
>         }
>
> Instead currently it  the load source as [file:///home/user/null]
>
> Thanks,
> Siddhi
>