Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
marcus_sommer

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

View solution in original post

8 Replies
marcus_sommer

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

Anonymous
Not applicable
Author

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?

marcus_sommer

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

Anonymous
Not applicable
Author

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!

Anonymous
Not applicable
Author

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];

marcus_sommer

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

Anonymous
Not applicable
Author

That worked, thanks so much!

Anonymous
Not applicable
Author

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