5 Replies Latest reply: Aug 4, 2014 2:40 PM by AVIRAL NAG RSS

    Renaming Fields

      How to Rename Field in Inline,XMLetc..

        • Re: .
          Senarath Bandara Herath

          Hi,

          there are functions such as Rename, Replace.

          Simply you could alias 'as'

           

          Not sure whether I'm answering your exact requirement

           

          Thanx

          • Re: Renaming Fields
            vishal waghole

            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

            • Re: Renaming Fields
              Giuseppe Novello

              Yogesh,

               

              Is this for QliK Sense or Qlikview personal edition?

               

              Gio

              • Re: Renaming Fields
                Chip Matejowsky

                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;

                • Re: Renaming Fields
                  AVIRAL NAG

                  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