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

Primary key on Qlik Sense

Hi everyone,

I'm loading data from a odbc database connection and I would like to know if the field marked as primary key by Qlik Sense is the real primary key of the database.

THanks!

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

No, it has nothing to do with how it is tagged in the database.

The Qlik engine simply looks at some of the properties of the key.

  • A "Perfect Key" has no duplicates and is complete: It contains all the values of the field.
  • A "Primary Key" has no duplicates, but is incomplete. Other values may exist in other tables.
  • A "Key" has duplicates.

This classification is visible in different ways in QlikView and in Qlik Sense:

Key1.png

Key2.png Key3.png

HIC

View solution in original post

5 Replies
Gysbert_Wassenaar

Which database? The source database? It can have lots of primary keys. Every table can have a primary key. Or do you mean the in-memory database of the Qlik Sense app? That doesn't have primary keys. It will have fields marked as keys which means those fields are used to associate tables with each other.


talk is cheap, supply exceeds demand
jagan
Luminary Alumni
Luminary Alumni

Hi,

Qliksense just loads the table from the databases.  It do not have any primary keys in built, there is only key fields in Qliksense, that is the join fields between the two tables based on the column names.  There is no concept of Primary key or Foreign key in Qlikview.

Regards,

Jagan.

qlikviewwizard
Master II
Master II

Hi Pollyanna Goncalves

If the table doesn't have any primary key in source database, we can combine more than one field and make it primary key.

Check the source table data . Hope this will help you. Thank you.

hic
Former Employee
Former Employee

No, it has nothing to do with how it is tagged in the database.

The Qlik engine simply looks at some of the properties of the key.

  • A "Perfect Key" has no duplicates and is complete: It contains all the values of the field.
  • A "Primary Key" has no duplicates, but is incomplete. Other values may exist in other tables.
  • A "Key" has duplicates.

This classification is visible in different ways in QlikView and in Qlik Sense:

Key1.png

Key2.png Key3.png

HIC

Not applicable
Author

‌Thank you for the aswers. That's because I'm dealing with a DB that I do not have the data dictionary, in other words, I would like to link tables just how they are linked in the source database. So I thought if the "primary key" gave by Qlik Sense was the primary key of the source.