You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Gayatri Rao <rg...@gmail.com> on 2011/10/24 18:32:31 UTC

Explicitly setting schema

Hi,

In pig 0.8.1 I wrote a custom load func which returns a bag of tuples. Do i
have to explicitly specify the schema in that case?
Do I have to implement LoadMetadata in that case?

If I dont specify the schema in the pig script it is able to load ints and
logs but when I try to load strings it gives me errors but with no useful
exceptions or errors but only says that it cant find iterator for alias.
This makes it difficult to understand what is the error.

Thanks
Gayatri

Re: Explicitly setting schema

Posted by Daniel Dai <da...@hortonworks.com>.
If your custom loader don't implements LoadMetadata.getSchema(), then you
will need to specify the schema in script. JobtrackerUI usually game more
detailed error message if frontend does not give you enough information.

Daniel

On Mon, Oct 24, 2011 at 9:32 AM, Gayatri Rao <rg...@gmail.com> wrote:

> Hi,
>
> In pig 0.8.1 I wrote a custom load func which returns a bag of tuples. Do i
> have to explicitly specify the schema in that case?
> Do I have to implement LoadMetadata in that case?
>
> If I dont specify the schema in the pig script it is able to load ints and
> logs but when I try to load strings it gives me errors but with no useful
> exceptions or errors but only says that it cant find iterator for alias.
> This makes it difficult to understand what is the error.
>
> Thanks
> Gayatri
>