Sudha, On Mon, Oct 1, 2012 at 9:31 AM, sudha sadhasivam <sudhasadhasi...@yahoo.com> wrote: > We are doing a project in Hive. > Given a field / value is it possible to find the corresponding > headers (meta data). > For example if we have a table with id, user, work_place, > residence_place > given a value "New York" we need to display the headers where New York > appears ( for eg work_place, residence_place etc. > > Kindly intimate whether it is possible. If so what is the command for the > same?
It is certainly possible and is a trivial requirement. All you're doing is a filtering here, across multiple columns (OR-wise). Perhaps something like (Pardon if naive/wrong): "SELECT * FROM people WHERE residence_place LIKE '%New York%' OR work_place LIKE '%New York%';" In any case, for Hive questions, you are better off asking the u...@hive.apache.org lists than the Hadoop user lists here. -- Harsh J