Odd behaviour parsing file loaded with sqoop
I have a very odd problem regarding json files loaded with sqoop. Here's
my scenario
Load flat json blobs from a single column from mysql using sqoop.
This ends up in a few part-m-0000x files in hdfs where each line is a json
blob.
Upon inspection of the files everything looks fine.
When attempting to load part-m-00000 out of hdfs the json library
(jackson) starts complaining about Unexpected character (':' (code 58)):
expected a valid value (number, String, array, object, 'true', 'false' or
'null').
Sounds like my json is bad right? Well here's the kicker:
if I copyToLocal part-m-00000 and then copyFromLocal part-m-00000 without
doing anything to the file I can now load the file using the library just
fine.
This doesnt make any sense to me and I'm really scratching my head. Anyone
has any idea what's going on ?
Thanks!
No comments:
Post a Comment