Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Mapping Field Names

Hi,

I am stuck with up with a small problem in my development. I know we can rename the fields by using an excel file and mapping a new name to a given name in the database and i am trying to achieve it but to no luck.

here is my script task code

Markdown_Status :

LOAD

              MARKDOWN_STATUS_KEY,

        MARKDOWN_STATUS_FLAG,

        MARKDOWN_STATUS_CODE,

        ApplyMap('Map_Status',MARKDOWN_STATUS_CODE) AS Status_Desc,

        MARKDOWN_STATUS_DESC;

SQL SELECT *

FROM EDW.Inventory."TEDW_D_MARKDOWN_STATUS_TYPE_1";

STORE Markdown_Status INTO Datasources\Markdown_Status.qvd  (qvd) ;

MAP_FieldNames:

Mapping

LOAD

                    Field,

                    DisplayName

FROM

$(C:\QV Development\)Book1.xls

(biff, embedded labels, table is Markdown_Status);

Attached is my excel file in which i have given the name of the field in database and my desired name and now i want to use the replace the field name of database to my desired name and even in the future if i want to change my desired name i can directly change the excel file and its updated.

But for some reason it seems not working to me .Can some one please let me know exactly where did i go wrong?

Thanks,

Sujith.

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

The .xls file you attached should have the extension .xlsx since it's not a biff format, but ooxml format excel file. If you rename it to .xlsx and then use the file wizard to create the load statement it should work.

Did you also add a statement to the script to actually map the fields after adding the mapping table?

rename fields using MAP_FieldNames;


talk is cheap, supply exceeds demand

View solution in original post

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

The .xls file you attached should have the extension .xlsx since it's not a biff format, but ooxml format excel file. If you rename it to .xlsx and then use the file wizard to create the load statement it should work.

Did you also add a statement to the script to actually map the fields after adding the mapping table?

rename fields using MAP_FieldNames;


talk is cheap, supply exceeds demand