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

Switch to Plain View
Pig >> mail # user >> ERROR 1128: Cannot find field -

Copy link to this message
ERROR 1128: Cannot find field -
I've added a condition in my pig script which shall use in case A field x and in case B field y.

Something like:
(Schema.Version == 1 ? Field.x : Field.y) AS SomeField

The intention was to make my pig script future safe, because with the next schema (version != 1) the new "Field.y" is added and shall be used. When I run my script on the data with the "current" schema (version=1), I'm getting the following exception:

pig script failed to validate: org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1128: Cannot find field y in …

Unfortunately it looks like pig is validating every field, even if it's not used/called?!

Thanks in advance!

Cheolsoo Park 2013-12-29, 02:39