You probably need to use the aggregation function count() in your load script, thus you need a group by statement, something like ( I join the result back to your original table, not sure if this is what you want:
LEFT JOIN (S_IP) LOAD
if(count(IP_NAME),1,0) as IP_NAME_COUNT_FLAG
resident S_IP group by IP_LOCATION;
IP_Location IP_Name IP_Serial_Lot_Number FLAG_DUPE 10193_008_2 Hexapod Evo Module 002990 10193_008_2 XVI KV Generator Serialized-GOL 1 10193_008_2 iViewGT aSi Panel (MV) Serialized-GOL 1 10193_008_2 iViewGT aSi Panel (MV) 3375 1 10193_008_2 XVI KV Generator G30310 1 The first three columns come from the table I am loading, the fourth one (FLAG_DUPE) is the one I would like to create.
Sorry, it's hard for me to read your table, I tried to parse in it an INLINE version, comma separated and added an flag creation. Maybe like this?
LOAD * INLINE [
IP_Location, IP_Name, IP_Serial_Lot_Number
10193_008_2, Hexapod Evo Module, 002990 ,
10193_008_2 , XVI KV Generator , Serialized-GOL
10193_008_2, iViewGT aSi Panel (MV), Serialized-GOL
10193_008_2, iViewGT aSi Panel (MV), 3375
10193_008_2, XVI KV Generator, G30310
left join LOAD IP_Location, IP_Name, if (count( IP_Name)>1,1,0) as DUPE Resident IP Group by IP_Location, IP_Name;