Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I am implementing mapping Load but it is not coming out correctly. Any suggestions where I am going wrong
TempTable1:
LOAD *
;
SQL SELECT *
FROM "Table1" ;
Table1:
NoConcatenate
LOAD *
RESIDENT TempTable1;
Drop Table TempTable1;
LabelsMap:
MAPPING Load
QV_COLUMN_LABEL as [QV Column Label],
NEW_QV_COLUMN_LABEL as [New QV Column Label]
;
SQL SELECT *
FROM "RPRO_QV_ATTRIBUTE_LABELS_V" where "QV_TABLE_NAME"='Table1';
Store Table1 into Table1.qvd;
Please Advise
Rizwan:
It is not very clear what you are trying to do.
Mapping load should have only 2 columns.
One column should be used for comaprison.
So if you have 2 columns say ID and desc. You will compare with ID and get desc in your main table.
In the main table where you want to get desc based on ID, you should use Applymap function.
something like
ApplyMap('MappingTableName',ID) As Desc
I don't see any of this in your code.
Hope my response helps or Please post your requirement clearly.
at pag. 30 of this doc you can find an explanation and example of mapping load
Hi,
Here is a code example using mapping Load
Customers:
Load CustomerID, Name, Country Inline [
CustomerID, Name, Country
1, DataSales, Spain
2, BusinessCorp, Italy
3, TechCo, Germany
4, Mobecho, France
];
mapIDtoCountry:
mapping Load CustomerID, Country
Resident Customers;
// here CustomerID will mapped to Country name using "mapIDtoCountry"
LoaOrders:
Load OrderID, OrderDate, ShipperID, Freight, CustomerID,
ApplyMap ('mapIDtoCountry' , CustomerID, Null()) as CountryName
Inline [
OrderID, OrderDate, ShipperID, Freight, CustomerID
12987, 2007-12-01, 1, 27, 3
12988, 2007-12-01, 1, 65, 4
12989, 2007-12-02, 2, 32, 2
12990, 2007-12-03, 1, 76, 3
];
Regards,
I did not attach the related qvw sample
See attached
Thanks