6 Replies Latest reply: Mar 10, 2016 4:55 AM by Roberto Angelucci RSS

    Binary Load

    Roberto Angelucci

      Once I have done a Binary load of another qlikview file how do I them manipulate the data on load?

      I cannot seem to be able to reference the data from the binary load.

      Scenario:

       

      the test.qvw has a loaded data set with FieldA, FieldB, FieldC in table Tester

       

      In a new file I wanted use the same data but the fields need new names, I tried the below but I cannot seem to return any data although I know the Binary Load works as I can see the data in the table viewer.

       

      Binary [c:\temp\test.qvw];

       

      A_Table:

      Load * inline

            [ a,b,c];

       

      Load

           Peek([FieldA]) as a;

           Peek([FieldB]) as b;

           Peek([FieldC]) as c;

      Resident A_Table;

       

      Help is much appreciated.

        • Re: Binary Load
          Sunny Talwar

          Roberto Angelucci wrote:

           

          A_Table:

          Load * inline

                [ a,b,c];

           

          Load

               Peek([FieldA]) as a;

               Peek([FieldB]) as b;

               Peek([FieldC]) as c;

          Resident A_Table;

          What exactly are you trying to do here?

          • Re: Binary Load
            Stefan Wühl

            Do you want to just rename your fields? Then use RENAME FIELD:

             

            Renames one or more existing QlikView field(s) after they have been loaded.

             

            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.

             

            The syntax is:

            rename field (using mapname | oldname to newname{ , oldname to newname })

            rename fields (using mapname | oldname to newname{ , oldname to newname })

            where:

            mapname is the name of a previously loaded mapping table containing one or more pairs of old and new field names.

            oldname is the old field name .

            newname is the new field name.


            Renaming won't work for key fields, though.

              • Re: Binary Load
                Roberto Angelucci

                Sunny,

                 

                Thanks for the response. What I am trying to do is reuse data that is being used from another qlikview file. However once I have loaded the data from the other file, what I am trying to do is then use the same data but to rename the fields to match the new file I am working on and clean the data. as an example. I have the FieldA that in the file is a long string, in the new file I still need the same data but now want to parse the last 3 characters just by doing the following (or I thought the script would be):

                 

                Right(Peek(FieldA),3) as a.

                 

                However using the script above I do not seem to be able to get the data from FieldA. Ie I can load it using binary and then use it to display the tables but when I try to manipulate the data in the script the tables are empty.

                 

                I don't know if this makes sense, but don't really know how to explain it and I cannot load the files up as I have some proprietary info etc in the files.