Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> Pig Parameter Substitution


Copy link to this message
-
Re: Pig Parameter Substitution
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
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB