Created
June 21, 2013 09:56
-
-
Save sureshsaggar/5830183 to your computer and use it in GitHub Desktop.
Apache Pig - Convert bytearray(json) to bag or maps?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here X contains one column named 'metadata' of type bytearray. But the actual content is a JSON i.e. the d is a JSON (keys as sId & cId) as shown below: | |
grunt> describe X | |
X: {metadata: bytearray} | |
grunt> dump X | |
({"sId":"003_w","cId":"k"}) | |
({"sId":"001_rf","cId":"r"}) | |
({"sId":"001_rf","cId":"r"}) | |
({"sId":"004_rf","cId":"r"}) | |
Any idea how can I generate cId & sId as separate chararray columns? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment