You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-user@hadoop.apache.org by Ramasubramanian Narayanan <ra...@gmail.com> on 2014/06/12 10:47:20 UTC
How to overwrite Key in RecordReader function
DA,
We are trying to write a UDF to read an XML which contains some unbounded
tags.
For repeated tags, new row has to be generated.
Please let us know how to ovewrite the default key with the new key in the
Record Reader function (where we do for loop to make multiple rows).
*Sample XML:*
<students>
<student>
<name> ABC </name>
<Addresses>
<Address> address1 </Address>
<Address> address2 </Address>
</Addresses>
</student>
</students>
*Expected Output* (using custom input format in HIVE table and quering
through a view using xpath).
ABC | address1|
ABC | address2
Thanks and Regards,
Rams