Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HELLO SIRS ,
Please help me on the below output to get ,
Combination to Get Final Field
IF TIER IS = O AND Area is Geologics then Final Field will be Geological
IF TIER IS = Z AND Area is Growth then Final Field will be Growth
IF TIER IS = B AND Area is Fashion then Final Field will be Fashion
IF TIER IS = A AND Area is Fashion then Final Field will be Textile Technology & Fabrics
Data :
Data:
LOAD * INLINE [
Conference_Id, Date, Speaker, Area, Tier, Company, Room_Nbr
108-23-6686, 22-08-2017, Pernell Vayne, Climate, Tier C, Riffpath, Ball Room 6
108-23-6686, 22-08-2017, Jeannine Wickett, Geologics, Tier O, JumpXS, Ball Room 6
108-23-6686, 22-08-2017, Israel Davidson, History, Tier C, Tagchat, Ball Room 6
108-23-6686, 22-08-2017, Ed MacCarlich, Climate, Tier C, Wikizz, Ball Room 6
108-23-6686, 22-08-2017, Gerri Elbourne, Climate, Tier C, Feedfire, Ball Room 6
108-23-6686, 22-08-2017, Adan Anthonsen, Geologics, Tier O, Fiveclub, Ball Room 6
500-37-5569, 23-08-2017, Rhea Tuxell, Inflation, Tier X, Kare, Ball Room 7
500-37-5569, 23-08-2017, Pernell Vayne, Inflation, Tier X, Thoughtsphere, Ball Room 7
500-37-5569, 23-08-2017, Jeannine Wickett, Jobs, Tier Q, Youbridge, Ball Room 7
500-37-5569, 23-08-2017, Israel Davidson, Growth, Tier Z, Blogtags, Ball Room 7
108-23-6689, 24-08-2017, Cordelia Brunt, Fashion, Tier B, Blognation, Ball Room 11
108-23-6689, 24-08-2017, Ed MacPEARSON, Textile, Tier A, Aimbu, Ball Room 11
500-37-2222, 25-08-2017, Ceciley Cushion, Growth, Tier X, Blogtags, Ball Room 1
500-37-2222, 26-08-2017, Gracia Cheek, Fashion, Tier A, Blognation, Ball Room 1
500-37-2222, 27-08-2017, Cale Curuclis, Textile, Tier A, Aimbu, Ball Room 1
];
I have mereged the records but how to get last field ?
Thank you
May be something like this
IF( WildMatch(Concat( DISTINCT Tier, ' ,'), '*Tier O*') AND WildMatch(Concat( DISTINCT Area, ' ,'), '*Geologics*'), 'Geological',
IF( WildMatch(Concat( DISTINCT Tier, ' ,'), '*Tier Z*') AND WildMatch(Concat( DISTINCT Area, ' ,'), '*Growth*'), 'Growth',
IF( WildMatch(Concat( DISTINCT Tier, ' ,'), '*Tier B*') AND WildMatch(Concat( DISTINCT Area, ' ,'), '*Fashion*'), 'Fashion',
IF( WildMatch(Concat( DISTINCT Tier, ' ,'), '*Tier A*') AND WildMatch(Concat( DISTINCT Area, ' ,'), '*Fashion*'), 'Textile Technology & Fabrics'))))
May be something like this
IF( WildMatch(Concat( DISTINCT Tier, ' ,'), '*Tier O*') AND WildMatch(Concat( DISTINCT Area, ' ,'), '*Geologics*'), 'Geological',
IF( WildMatch(Concat( DISTINCT Tier, ' ,'), '*Tier Z*') AND WildMatch(Concat( DISTINCT Area, ' ,'), '*Growth*'), 'Growth',
IF( WildMatch(Concat( DISTINCT Tier, ' ,'), '*Tier B*') AND WildMatch(Concat( DISTINCT Area, ' ,'), '*Fashion*'), 'Fashion',
IF( WildMatch(Concat( DISTINCT Tier, ' ,'), '*Tier A*') AND WildMatch(Concat( DISTINCT Area, ' ,'), '*Fashion*'), 'Textile Technology & Fabrics'))))
Sir , Since my data in real time is huge , i wanted to handle more using script than SET EXPRESSION .. If you can hlep me on those lines
You only have to make some minor changes - adding something to the data model and adding a third parameter to each of you Concat() expressions in your table:
mapping conference id to final field is not correct way i believe , because in real time i will have millions of conferences and final field depends on Tier & Area combination
Then you can just make the correct key between them by having a composite key or concatenated keys involving the right fields. Should be an easy adjustment.
Here is a suggestion for a solution that also shows how it can be done in a load script:
Actually this is a good argument for having a separate associated table or doing a ApplyMap() with a Mapping Load. Having explicit If's would be very unmanageble for that volume of data...
The task is not quite clear, but you can get the above result even in this way
Data:
LOAD * INLINE [
Conference_Id, Date, Speaker, Area, Tier, Company, Room_Nbr
108-23-6686, 22-08-2017, Pernell Vayne, Climate, Tier C, Riffpath, Ball Room 6
108-23-6686, 22-08-2017, Jeannine Wickett, Geologics, Tier O, JumpXS, Ball Room 6
108-23-6686, 22-08-2017, Israel Davidson, History, Tier C, Tagchat, Ball Room 6
108-23-6686, 22-08-2017, Ed MacCarlich, Climate, Tier C, Wikizz, Ball Room 6
108-23-6686, 22-08-2017, Gerri Elbourne, Climate, Tier C, Feedfire, Ball Room 6
108-23-6686, 22-08-2017, Adan Anthonsen, Geologics, Tier O, Fiveclub, Ball Room 6
500-37-5569, 23-08-2017, Rhea Tuxell, Inflation, Tier X, Kare, Ball Room 7
500-37-5569, 23-08-2017, Pernell Vayne, Inflation, Tier X, Thoughtsphere, Ball Room 7
500-37-5569, 23-08-2017, Jeannine Wickett, Jobs, Tier Q, Youbridge, Ball Room 7
500-37-5569, 23-08-2017, Israel Davidson, Growth, Tier Z, Blogtags, Ball Room 7
108-23-6689, 24-08-2017, Cordelia Brunt, Fashion, Tier B, Blognation, Ball Room 11
108-23-6689, 24-08-2017, Ed MacPEARSON, Textile, Tier A, Aimbu, Ball Room 11
500-37-2222, 25-08-2017, Ceciley Cushion, Growth, Tier X, Blogtags, Ball Room 1
500-37-2222, 26-08-2017, Gracia Cheek, Fashion, Tier A, Blognation, Ball Room 1
500-37-2222, 27-08-2017, Cale Curuclis, Textile, Tier A, Aimbu, Ball Room 1
];
Left Join
LOAD * INLINE [
Tier, Area, Final_Area_Of_Discussion
Tier O, Geologics, Geological
Tier Z, Growth, Growth
Tier B, Fashion, Fashion
Tier A, Fashion, Textile Technology & Fabrics
];
Is this what you are looking for ? FYI ... I have not used Any Set expression .