Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
what is qualify and how can i use it?
qualify statement
Table1:
LOAD
A,
B
FROM DataSource;
Now the columns in the Table1 are internally represented as A, B.
Qualify *;
Table1:
LOAD
A,
B
FROM DataSource;
If we use Qualify then the columns in Table1 are internally repersented in Qlikview as Table1.A, Table1.B.
Qualify statement is used for renaming fields with the table name as a prefix. Let's suppose you have 2 dimension tables. Let's say Suppliers and Customers. In both dimensions you have several fields regarding contact information. You may have Address, Telephone and Name fields in both dimensions.
The problem comes if the names of these 3 fields are exactly the same in both dimensions, because you wil have a synthetic key (more than one field with the same name in different tables) when you try lo load both tables. This will impact in the performance of QlikView.
So the solution would be to rename one or both tables with Qualify statement:
Qualify for Suppliers:
QUALIFY *
Suppliers:
Load
Address, Telephone, Name
from table
UNQUALIFY *;
the result will be that these 3 fields in suppliers table will be renamed as Suppliers.Address, Suppliers.Telephone and Suppliers.Name
regards
Hi All
Can some one give me the link to download simple QV doc which show how to use Quality command ? i also vey interest to understand how it can help me .
The description given by Anutosh is useful, though it's worth pointing out that in many cases you may want only some of your fields to be qualified. Fields you are using for joins should not be qualified as you'll not end up creating your link!
An example:
QUALIFY *;
UNQUALIFY join.*;
Table1:
LOAD
A as join.A,
B
FROM DataSource;
Table2:
LOAD
A as join.A,
B
FROM DataSource;
In this example, we have retained a link between our tables on join.A, but avoided one on field B.
Marcus
Hi,
I think QULAIFY can be use in a way to prevent Synthetic Key as well.
Qualify B;
Load A,B from x.csv;
Load A,B from y.csv;
The two tables x.csv and y.csv are joined only on A. Three fields will result: A, x.B, y.B.
In an unfamiliar database, start out by making sure that only one or a few fields are associated, as illustrated
in this example:
qualify *;
unqualify TransID;
select * from tab1;
select * from tab2;
select * from tab3;
Only TransID will be used for associations between the tables tab1, tab2 and tab3.
Best Regards,
Gabriel