Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, i have a table like containing two columns.
Ex.
Name Segment
a 1
b 1
c 2
d 3
e 3
f 1
g 2
h 3
i 1
j 1
k 3
by using peek function i want to segregate names on the basis of segment 1, 2, and 3.
like
vsegment1= it should have names whose segment is 1
vsegment2=it should have names whose segment is 2
vsegment3= it should have names whose segment is 3.
please help.
Regards,
Piyush.
Piyush
I am not sure I understand what you are trying to achieve. Could you describe your desired end result ?
Best Regards, Bill
Hi Piyush,
As far as I know (of course I may be wrong) peek is a inter-registry function, that will help you to obtain records in previous psitions of the table you are loading.I do not know if this will be of help in your case.
You have the option to classify the names in the load script. In this case the segment will be stored in the VSegment field:
LOAD
Name,
Segment,
if(Segment='1','vsegment1',
if(Segment='2', 'vsegment2',
if(Segment='3','vsegment3','N/A'))) as Vsegment
FROM...
But I do not if this really is an improvement ....
Why peek? why not concat() like:
vsegment1=Concat({<Segment={1}>}Name, '-')
vsegment2=Concat({<Segment={2}>}Name, '-')
PFA
Hi,
Just want to capture name in variable vsegment1 whose segment is 1. and Likewise.