Member since
09-26-2016
7
Posts
3
Kudos Received
0
Solutions
09-27-2016
03:12 AM
I was thinking about as a way of removing header items. The CSVExcelStorage has this feature. I suppose I will just use the Filter function for this. I was trying to avoid any extra lines of code that did not need to be there.
... View more
09-26-2016
10:37 AM
1 Kudo
Can we access functions in the piggybank on the exam? Do we have to register jar or is it already loaded?
... View more
09-26-2016
09:51 AM
Thank you so much. That worked. Is biginteger uncastable? When would I use bytearray vs. specific type? Interesting thing is if I LOAD with schema joins on biginteger works fine. Would you consider this a bug?
... View more
09-26-2016
09:29 AM
I cannot dump PlaeyersAndHands either. Both HandPlayers and Hands dump fine.
... View more
09-26-2016
08:34 AM
1 Kudo
If I create a schema on load everything works fine. However I did not want to create whole schema for a few fields out of 100's. This script fails with Unable to open iterator for alias A. Backend error : java.lang.ClassCastException: org.apache.pig.data.DataByteArray cannot be cast to java.math.BigInteger H = LOAD '/user/horton/hands.txt' USING PigStorage(',');
FilteredHands = FILTER H BY (int)$10==6 AND (int)$5==6;
Hands = FOREACH H GENERATE $0 AS (HandID:biginteger), $5 AS (BigBet:double), $10 AS (PlayersInHand:int);
HP = LOAD '/user/horton/playerhands.txt' USING PigStorage(',');
HandPlayers = FOREACH HP GENERATE $1 AS (HandID:biginteger), $0 AS (PlayerName:chararray), $12 AS (AmtWon:double);
PlayersAndHands = JOIN Hands by HandID, HandPlayers by HandID;
A = FOREACH PlayersAndHands GENERATE Hands.HandID;
DUMP A; What am I doing wrong?
... View more
Labels:
- Labels:
-
Apache Pig