Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Three table association

Hi, I have 3 SQL tables, where table  B & C are associated to table A via a field that exists in the three tables!

Note that table B and C are not to be associated. For exemple, something like:

TableA - Employee

TableB - EmployeePayments

PK - E

TableC - EmployeeExtraHours

Table B and C primary keys are ID of the employee that is in table A.

When I do the profiling I associate A-B and A-C via the employeeID, but when the profiling tool is testing relation between tables B-C it suggests na association via 3 fields or "No Association"

When I choose "No Association", it suggests I rename the fields (that jave the same name) to break the association... but if I do that I break also the associations between A-C and A-B!!

In one image, I want something like this:

How can I solve this??

Best regards,

Carlos

5 Replies
Gysbert_Wassenaar

Perhaps like this:

TableA:

LOAD

     EmployeeID,

     EmployeeID as LinkKeyB,

     EmployeeID as LinkKeyC

     ...other fields...

FROM

     ...

TableB:

LOAD

     EmployeeID as LinkKeyB,

     ...other fields...

FROM

     ...

TableC:

LOAD

     EmployeeID as LinkKeyC

     ...other fields

FROM

...  


talk is cheap, supply exceeds demand
reddy-s
Master II
Master II

Hi Carlos,

Gysbert's reply should help you achieve what you are looking for. Also make sure the field names in table B do not match the field names in table C. This will make sure there is no association formed between tables B and C as you wanted.

Thanks,

Sangram

Not applicable
Author

Ok, Gysbert, your answer seems it will work, but... am I asking for something so special it can't be done with the normal profiler?? I have a few tables like this one and it would be easier if it could be done via graphic interface!

I'll try your tip and giove feedback. Thanks!

Best regards,

Carlos Silva

reddy-s
Master II
Master II

Hi Carlos,

Most of the data model problems can be handled by qlik sense. There are many workarounds to problems we face. If you problem is tough to explain, It would be easy if you can post a sample qvf.

Thanks,

Sangram

Gysbert_Wassenaar

No, the profiler can't handle these kind of decisions for you (yet).


talk is cheap, supply exceeds demand