Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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
Employee
Employee

Re: Primary key on Qlik Sense

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

5 Replies

Re: Primary key on Qlik Sense

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
MVP
MVP

Re: Primary key on Qlik Sense

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.

Arjunarao
Honored Contributor II

Re: Primary key on Qlik Sense

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.

Employee
Employee

Re: Primary key on Qlik Sense

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

Re: Primary key on Qlik Sense

‌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.

Community Browser