Reputation: 449
Is there a way to mention a mapping statement inside a tag statement in the QlikView load script? What I am trying to achieve is something like this:
TAG Fields using [Mapping Load * Inline [
FieldName, Tag
SaleOrderId, $dimension
Sales, $measure]];
Right now my load script is like this:
[MapTable]:
Mapping Load * Inline [
FieldName, Tag
SaleOrderId, $dimension
Sales, $measure
];
TAG Fields using [MapTable];
I am working on an API call and wanted to test out the behavior of several commands in the load script. Using a mapping keyword is suppose to delete the MapTable as soon as the load script is executed, but that is not happening with my call. When I have a command like the one mentioned above [having mapping load inside tag], I am not able to see the tags set to the fields in the QlikView, but the table is not seen at my end. Would like to get this with the tags set for the fields. Any suggestions?
Upvotes: 0
Views: 130
Reputation: 199
I don't believe you can embed the tag data as an inline load as a part of the call to the TAG FIELDS statement - it only accepts the name of a mapping table, or the literal values (in the instance of tagging fields explicitly).
The second part of the script you posted looks ok to me. I can't see your source data, but I tried below and it seems to be working fine. Yes - mapping tables are not visible in the data model viewer, and are dropped at the completion of execution of the load script. Beware that the data will remain in memory during the execution of the script (this can sometimes be a consideration if you have large mapping tables).
[DataTable]:
LOAD * Inline [
SaleOrderId,Sales
1,1000
2,2000
];
[MapTable]:
Mapping Load * Inline [
FieldName, Tag
SaleOrderId, $chicken
Sales, $dog
];
TAG Fields using MapTable;
I changed the tags from the defaults (as these are interpreted in QlikSense which I am using as I am at home on my mac). The syntax is the same for Qlikview as far as I am aware (I use QV at work heavily).
Upvotes: 2