Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loading and Joining tables

Hello

I'm a bit confused about how QV joins files together. See attached picture.

In one of my QV applications I load in a master claim file and then use "LEFT JOIN" to load in the remaining tables. When I look at the table viewer I see a single table with all the fields from all the tables I've loaded in.

In another QV I do the same thing, but the table viewer shows me all the tables as separate with lines connecting the key fields. There is also the word $syn that appears on some of the files. What is this? Is it a good thing or should I try to avoid it? What am I doing wrong, if anything?

Should I be left joining my files? If I just load them I get out of memory errors. Is there any help about all this available somewhere?

Many thanks!

2 Replies
Not applicable
Author

Well,

In fact the behaviour of your script is normal :

The join and keep prefixes in the QlikView script language can be preceded
by the prefix left. If used before join , it specifies that the join between the two tables should be
a left join. The resulting table only contains combinations between the two
tables with a full data set from the first table.
If used before keep it specifies that the second table should be reduced to its

That is to say, when you make a left join, the result is stored in your first table. Is that good or bad ? It depends on what do you want to do with your data

About the synthetic keys : they are created automatically created when composite keys are needed to join your table (that is to say when the join is made upon severals fields between two tables). Is that bad or good ? Once again it depends about what you need :

If you agree with the fields used for the join. The result will be OK (except sometime some useless synthetic keys of synthetic keys appeared). QlikTech recommand to create your own synthetic key with the autonumber function

But anyway your questions are very general and the precise answer depend on what do you want to do and on your data model.

Anyway I advise you to first consult the reference manual looking for "Left join" and "synthetic keys".

hope it helps

Regards

amars
Specialist
Specialist

Hi,

Internally QlikView tries to join the loaded tables using the Alias, as in your case , the alias (Claim No, Stat , bus) are matching in the two tables & in another [Rule ID] is matching , So as per QlikView document , it uses An Associative Law to join the tables (IN SQL Full Outer Join).

If your data is less than you can ofcourse go for SQL join , if your data is large then taking join will increase the size in multiples so it is better to keep it for qlikview to join it internally (Using Associative Law)

Regards

Amar