新袋生成后清管器不能倾倒

0pizxfdo  于 2021-06-24  发布在  Pig
关注(0)|答案(0)|浏览(151)

这是我的剧本:

Customer = LOAD '/home/hduser/PigSandbox/PigOut/Customer_Base.json/part-r-00000' USING JsonLoader();

CustomerPost = FOREACH Customer GENERATE ((chararray)Email
,DateModified
,Age
,City
,Name
,Occupation
,State
,Address1
,Address2
,Company
,Country
,DateOfBirth
,Fax
,Phone
,PostalCode);

DUMP CustomerPost;

这是我得到的错误:

java.lang.Exception: org.apache.pig.backend.executionengine.ExecException: ERROR 1075: Received a bytearray from the UDF or Union from two different Loaders. Cannot determine how to convert the bytearray to string.

我只想从一个 bytearraychararray . 如果有更好的方法比产生一个新的包,请让我知道这一点。如果没有,我怎样才能得到我的工作?或者至少这个错误意味着什么?
从2014年11月16日起,我的pig版本是0.14.0
下面是一个示例行:

{"Email" : "foo@bar.com", "DateModified":"2014-12-27T07:36:38.000-05:00","Age":"10-20","City":"Some Location","Name":"foo","Occupation":"engineer","State":"ok","Address1":"foo lane","Address2":null,"Company":"lorem","Country":"us","DateOfBirth":"1969","Fax":"555-555-5555","Phone":"555-555-5555","PostalCode":"12345"}

这是模式文件

{"fields":[{"name":"Email","type":50,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"DateModified","type":30,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"Age","type":55,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"City","type":55,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"Name","type":55,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"Occupation","type":55,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"State","type":55,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"Address1","type":55,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"Address2","type":55,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"Company","type":55,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"Country","type":55,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"DateOfBirth","type":55,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"Fax","type":55,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"Phone","type":55,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"PostalCode","type":55,"description":"autogenerated from Pig Field Schema","schema":null}}

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题