Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mendoncart
Contributor III
Contributor III

Sugestion: Avoid Synthetic keys

Hi, everyone.

I'm having problems whit tables that relates with other tables.

Like the vendors table (lets call it V), it relates with the sales (S) and customer (C) table, whitch also relates with each other (S x C).

This is generating synthetic keys, because sales relates with vendors, customers relates with vendors, and sales relates with customers.

What can I do to avoid this problem?

Thanks!

1 Solution

Accepted Solutions
rittermd
Master
Master

You need to rename fields in your script so that they don't match other tables.  QS automatically associates fields with the same names.

Or you can create a new concatenated key that combines fields that need to associate with the other tables. 

If you are still stuck maybe you can provide actual data examples.

View solution in original post

4 Replies
rittermd
Master
Master

You need to rename fields in your script so that they don't match other tables.  QS automatically associates fields with the same names.

Or you can create a new concatenated key that combines fields that need to associate with the other tables. 

If you are still stuck maybe you can provide actual data examples.

mendoncart
Contributor III
Contributor III
Author

Thanks, I'll load the same table again and change the field names, this will work but I thought maybe there was another way.

Thank you for helping me!

dwforest
Specialist II
Specialist II

There's also a "quick" way to create unique names using Qualify and Unqualify... Qualify will prepend the table name to the field.

Qualify *;

Unqualify ID;

[table1]:

LOAD ID, name, measure from table1;

Assuming you still want ID fields to connect to other tables.

result will give you fields ID, table1.name, table1.measure

mendoncart
Contributor III
Contributor III
Author

This is very helpful! I'll try it.

Thank you!