Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Renaming Fields

How to Rename Field in Inline,XMLetc..

5 Replies
senarath
Contributor III

Re: .

Hi,

there are functions such as Rename, Replace.

Simply you could alias 'as'

Not sure whether I'm answering your exact requirement

Thanx

vishalwaghole
Valued Contributor II

Re: Renaming Fields

for inline you need to use resident load and rename fields.

let see one example

TEST:

Load * Inline [

SaleId, product, Sale

001, ABC, 200

002, PQR, 300

];

NoConcatenate

TEST2:

Load     SaleId,

            product as SaleProduct,

            Sale as SaleAmount

Resident TEST;

drop table TEST;

same u can "as" keyword for XML load.

-- Regards,

Vishal Waghole

gno
Valued Contributor II

Re: Renaming Fields

Yogesh,

Is this for QliK Sense or Qlikview personal edition?

Gio

wmy
Valued Contributor

Re: Renaming Fields

Check the Qlik Sense online Help. Below is the entry for Rename Field.

Rename field

This script function renames one or more existing Qlik Sense field(s) after they have been loaded.

Either syntax: rename field or rename fields can be used.

Syntax:

Rename Field (using mapname | oldname to newname{ , oldname to newname })

Rename Fields (using mapname | oldname to newname{ , oldname to newname })

Arguments:

ArgumentDescription
mapnameThe name of a previously loaded mapping table containing one or more pairs of old and new field names.
oldnameThe old field name.
newnameThe new field name.

Limitations:

Two differently named fields cannot be renamed to having the same name. The script will run without errors, but the second field will not be renamed.

Example 1:

Rename Field XAZ0007 to Sales;

Example 2:

FieldMap:

Mapping SQL Select oldnames, newnames from datadictionary;

Rename Fields using FieldMap;

aveeeeeee7en
Valued Contributor III

Re: Renaming Fields

Hi Yogesh

1) Renaming Fields in Inline:

Load *, Name as NewName Inline [

Name

Yogesh

Rajesh

]

2) Other files:

Simply by using AS or Alias

eg. Load *,

Name,

Name as NewName

From ...

Regards

Aviral Nag