Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I have an application and I want to change a dimension data with another data with the help of mapping..
Example:
Display Name(Application data) field will map to Display Name1(Excel) and Division(Application data) map to Division1(Excel).
Please reply soon..
use Applumap()
Step 1: Load the mapping table
NameMap:
Mapping LOAD
Code1,
Description1
From Sample.xlsx (ooxml, embedded labels, table is [example table]);
Step 2: Load table and apply the map
Table:
Load
Code1,
Name1,
ApplyMap('NameMap', Code1, Code1) as Description
From Sample2.xlsx (ooxml, embedded labels, table is [example table 2]);
Hi Rahul,
Use here applymap fuction. Mentoned below is the example:
[tmpData1]:
LOAD * INLINE [
F1, F2
1, 100
2, 200
3, 300
4, 400
5, 500];
[Mapping1]:
MAPPING
LOAD * INLINE [
CusID, CustName
1, AA
2, BB
3, CC];
[TestApplyMap]:
LOAD
F1 AS CustomerID,
APPLYMAP('Mapping1',F1,'-') AS CustomerName,
F2 AS Amt
RESIDENT [tmpData1];
DROP TABLE [tmpData1]
Its not working on appling Apply man.. pLz find attachment.
I understand applymap but its not giving the right result plz find my latest attachment..
Try this Code as example
ADC:
MAPPING LOAD RowNo() as Key, * INLINE [
Country
IND
AUS
WI
NZ
];
Map COUNTRY using ADC;
LOAD * Inline [
COUNTRY
INDIA
AUSTRALIA
WESTINDIES
NEWZELAND
];
Yes I thought Mapping load will work but can anyone tell me how to use it in my application..
Mapping load would be what you require from what I have understood. Maybe look into the lookup function as well. Will match a field value to a field value you want from a table you specify
Your example QVW does it wrong. First create two mapping tables, then use them trough applymap() when loading data to be translated from any source into a resident table.
The two mapping tables have two columns: the first one is the original data, the second contains the translations. All the above examples by community members do explain how to create mapping tables.
For your case, do this:
MapPersons:
MAPPING LOAD [Display Name], [Display Name1]
FROM PutExcelSourceHere.
MapDivisions:
MAPPING LOAD [Division], [Division1]
FROM PutExcelSourceHere.
Employees:
LOAD [Display Name] AS [Original Display Name],
applymap('MapPersons', [Display Name]) AS [New Display Name],
[Division] AS [Original Division],
applymap('MapDivisions', [Division]) AS [New Division],
:
FROM PutEmployeeSourceHere;
Replace your Main 2 code with this example code, but do not forget to adapt it to your particular situation. Your document does not contain enough information for a use case.
Best,
Peter