Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

czehnder
New Contributor

Mapping Column names and descriptions

I currently have an excel file attached that will map our database field names to the business names. That works fine.

[Alias Fields]:

Mapping LOAD

    OldName,

    NewName

FROM [lib://AmerisureData/Warehouse\AWHColumnAliases.xlsx]

(ooxml, embedded labels, table is Aliases);

Rename Fields using [Alias Fields];

I would like to take it a step further and populate the description of the field as well.  Does anyone have any examples on how to accomplish this?

Thanks in advance

1 Solution

Accepted Solutions

Re: Mapping Column names and descriptions

The mapping-statement is missing:

[Comment Fields]:
MAPPING LOAD
    "FieldName",
    "Comment"
FROM [lib://AmerisureData/Warehouse\AWHColumnComments.xlsx]
(ooxml, embedded labels, table is Aliases);

Comment fields using [Comment Fields];

- Marcus

8 Replies

Re: Mapping Column names and descriptions

It's the same mapping-logic. Here an example from the help:

Beispiel 1:

KommentarMap:

mapping load * inline [

a, b

Alpha, Dieses Feld enthält Textwerte

Num, Dieses Feld enthält numerische Werte

];

comment fields using KommentarMap;

- Marcus

czehnder
New Contributor

Re: Mapping Column names and descriptions

Thanks for your response Marcus.  i'm not sure about your browser but mine seems to be showing this in another language?  Was that the intent?

Re: Mapping Column names and descriptions

The intention was to show that with the same mapping-approach like for the renaming the fields could be enriched with comments and/or tags which could be used like here described: Comments, Tags, and Documentation

- Marcus

czehnder
New Contributor

Re: Mapping Column names and descriptions

So the English translation to your example is

Example 1:

CommentMap:

mapping load * inline [

a, b

Alpha, This Field Contains Text Values

Num, This Field Contains numerical values

];

comment fields using CommentMap;

https://help.qlik.com/en-US/sense/September2017/Subsystems/Hub/Content/Scripting/ScriptRegularStatem...

like in this link Correct? I'll give it a try. Thanks!

czehnder
New Contributor

Re: Mapping Column names and descriptions

ok, I tried it and I'm getting  the below error

What am I doing wrong?

Mapping table 'Comment Fields' not found: Comment fields using [Comment Fields]

[Comment Fields]:
LOAD
    "FieldName",
    "Comment"
FROM [lib://AmerisureData/Warehouse\AWHColumnComments.xlsx]
(ooxml, embedded labels, table is Aliases);

Comment fields using [Comment Fields];

Re: Mapping Column names and descriptions

The mapping-statement is missing:

[Comment Fields]:
MAPPING LOAD
    "FieldName",
    "Comment"
FROM [lib://AmerisureData/Warehouse\AWHColumnComments.xlsx]
(ooxml, embedded labels, table is Aliases);

Comment fields using [Comment Fields];

- Marcus

czehnder
New Contributor

Re: Mapping Column names and descriptions

That worked, thanks so much!

czehnder
New Contributor

Re: Mapping Column names and descriptions

This worked but we updated to April 2018 and now it no longer populates.  Is anyone having any Issues with it after the update?

Community Browser