Reputation: 109
Is it possible to get the filename of a record in Hive? That would be incredibly helpful for debugging.
In my particular case, I've an incorrect values in a table that is mapped to a folder with > 100 large files. To use grep is very inefficient
Upvotes: 0
Views: 1748
Reputation: 2553
HIVE
supports virtual columns, for example INPUT__FILE__NAME
. It gives the input file's name for a mapper task.
Have a look at the documentation here. It provides some example on how to do this.
Unfortunately, I'm unable to test the same now. Let me know if this is working or not.
Upvotes: 4