Suppose we have an input file as follows :- $vi source abcd deff,12, xyzd,US din,123,abcd,Pak And a keyword's file like :- $vi keyword abc,xyz xyz And say we want to produce output something like where there are 4 columns:- first column, indicates original value. second column, indicates indexes of keywords removed in original value. third column, indicates string after keywords are removed. fourth column, indicates number of times keywords are removed in original value. Firstly, let us create desired Tables in Hive as below: Hive> create table source ( inital_data string ) ; Hive> load data local inpath '/root/source' into table source; Put Keyword file to HDFS: $ hadoop fs -put /root/keyword hdfs://sandbox.hortonworks.com:8020/user/root/keyword We would be writing a Hive UDF "ReplaceKeyword" that would write desired output mentioned above with "$" se...