Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 david_pkma
		
			david_pkma
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello everyone,
I have a Mapping Table like:
MapCustomer:
Mapping LOAD ORGID, NAME
Reisdent Customer;
| ORGID | NAME | 
|---|---|
| 1 | Name1 | 
| 2 | Name2 | 
| 3 | Name3 | 
| 4 | Name4 | 
And now I have one field like:
FieldName: 1,2,3,4
(Comma seperated IDs inside that one field)
Now I want to load in the loading script instead of the FieldName IDs the actual names.
Something like:
LOAD *,
ApplyMap('MapCustomer', SubField(FieldName,','), null()) as AppliedMap
FROM
Source
And the result should be:
AppliedMap: Name1,Name2,Name3,Name4
It should be dynamic, since the count of IDs can vary.
Of course this does not work but I am really missing the point on how to make it work.
Thank you in advance
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Why don't you use MapSubString instead
MapSubString('MapCustomer', FieldName) as AppliedMap
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Why don't you use MapSubString instead
MapSubString('MapCustomer', FieldName) as AppliedMap
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sample script
MapCustomer:
Mapping
LOAD * INLINE [
ORGID, NAME
1, Name1
2, Name2
3, Name3
4, Name4
];
Table:
LOAD *,
MapSubString('MapCustomer', FieldName) as AppliedMap;
LOAD * INLINE [
FieldName
"1,2,3,4"
];
 david_pkma
		
			david_pkma
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Oh god, it was that simple all along? I really did not find it in the help.
Thank you so much, it worked!
