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 Plain View
Pig >> mail # user >> ERROR 1128: Cannot find field -


Copy link to this message
-
ERROR 1128: Cannot find field -
Hi,
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!
Nebo

+
Cheolsoo Park 2013-12-29, 02:39
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