Hi Karthik I am also having the same issue. Mine is I want to filter a column instead of a field and join to another file into a specific index.
I think someone here can suggest a better solution. On Mon, May 12, 2014 at 12:46 PM, kartik manocha <[email protected]>wrote: > Hi, > > I am new to pig & facing an issue in filtering out a string from a field, > mentioned is the scenario. > > - > I am loading data with several fields, among those fields there is > field name called 'test_data' > - > There are lot of things in this field, I wanted to filter out a string > from this field which starts from B75 & ends with semi colon. > - > After taking this string out, wanted to add this as a new field to the > existing bag which was loaded > > I tried using INDEXOF UDF, but that works for a single character only, > however when I tried using that for single character, it returns () only > instead of index number. I was just testing, & by manually providing > indexes in SUBSTRING UDF, it was generating string. > > But unable to get the position using indexof UDF, or may be there could be > a better of doing this. > > If you have any pointers / suggestions, please share. > > Thanks in advance. > > > Best, > Kartik > -- *Thanks & Regards * *Unmesha Sreeveni U.B* *Hadoop, Bigdata Developer* *Center for Cyber Security | Amrita Vishwa Vidyapeetham* http://www.unmeshasreeveni.blogspot.in/
