Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
simonsiplak
Contributor II
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
Creator III
Creator III

Create a link table of fields creating a synthetic key.

View solution in original post

2 Replies
miskinmaz
Creator III
Creator III

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

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.