Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

simonsiplak
New Contributor II

Synthetic keys again - Mutiple tables sam field

Hello,

I read some materials about syntetic keys, but I still have troubles to understand them correctly. Some articles say they are ok (in some cases) and some says you should avoid them completly.

For example I have this data schema:

SynKeys_QLIK.png

I have 3 main tables:

  • Customers - Every row is unique customer (with user_id, User_account_login, country_name etc.)
  • Invoices - Every row is invoice. So multiple rows could have same user_id (user could have more then 1 invoice). Also invoice have user_id and User_account_login who paid this invoice.
  • Active services - Every row is live service in DB. So multiple rows could have same user_id (user could have more than 1 service). It also has user_id and User_account_login who owns service.

When I use field "User_account_login" in Customers and Invoices it's ok and load script run's normally (but with syntetic keys). But when I add "User_account_login" to Active services it's stuck and load don't work. But for example when I use User_account_login as "%Key" for every table it goes ok. It's strange for me.

Is there way how to solve this Synthetic keys when all 3 tables have same field "User_account_login" and "country_name"?

1 Solution

Accepted Solutions
miskinmaz
Contributor III

Re: Synthetic keys again - Mutiple tables sam field

Create a link table of fields creating a synthetic key.
2 Replies
miskinmaz
Contributor III

Re: Synthetic keys again - Mutiple tables sam field

Create a link table of fields creating a synthetic key.
Highlighted
simonsiplak
New Contributor II

Re: Synthetic keys again - Mutiple tables sam field

Thanks @miskinmaz . It took me some time but after reading this article http://www.learnallbi.com/link-table-in-qlikview/ a I was able to solve it.