I think we already have this mapping code. Check the Pig store thingy. @prashantkommireddi  would know.