Can we use a mapping load statement inside a tag statement in QlikView?

时间:2016-04-04 18:32:48

标签: tags load qlikview

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?

1 个答案:

答案 0 :(得分:2)

我不相信您可以将标记数据作为内联加载嵌入作为TAG FIELDS语句调用的一部分 - 它只接受映射表的名称或文字值(在标记的实例中)字段明确地。)

您发布的脚本的第二部分对我来说没问题。我看不到您的源数据,但我在下面尝试过它似乎工作正常。是 - 映射表在数据模型查看器中不可见,并在加载脚本执行完成时被删除。请注意,在执行脚本期间数据将保留在内存中(如果您有大型映射表,有时可以考虑这一点。)

[DataTable]:
LOAD * Inline [
SaleOrderId,Sales
1,1000
2,2000
];

[MapTable]:
Mapping Load * Inline [
FieldName, Tag
SaleOrderId, $chicken
Sales, $dog
];

TAG Fields using MapTable;

我更改了默认设置中的标签(因为这些是在我使用的QlikSense中解释的,因为我在家里的Mac上)。据我所知,Qlikview的语法是相同的(我在工作中大量使用QV)。

enter image description here