Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Binary Load

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 ;

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.

1 Solution

Accepted Solutions
Digvijay_Singh

Try like this, T1 is a table in binary load qvw. -

A_Table:

Load * inline

      [ a,b,c];

  

Load

     right(Peek([FieldA],0,'T1'),3) as a,

     right(Peek([FieldB],0,'T1'),3) as b,

     right(Peek([FieldC],0,'T1'),3) as c

Resident T1;

View solution in original post

6 Replies
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?

swuehl
MVP
MVP

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.

Not applicable
Author

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.

avinashelite

if your trying to rename the fields with certain modification you could try like this :

New_table:

Load

     [FieldA] as New_a;

    [FieldB] as New_b;

     [FieldC] as New_c;

Resident table_name;//table name as in the qlikview binary load

Digvijay_Singh

Try like this, T1 is a table in binary load qvw. -

A_Table:

Load * inline

      [ a,b,c];

  

Load

     right(Peek([FieldA],0,'T1'),3) as a,

     right(Peek([FieldB],0,'T1'),3) as b,

     right(Peek([FieldC],0,'T1'),3) as c

Resident T1;

Not applicable
Author

Thank you all for the input, this has been really helpful and finally I understand!!!