Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
noviceneil
Partner - Contributor III
Partner - Contributor III

how to avoid synthetic key without alias

Hello Experts,

I need some help.

          I  have been trying to do the following,

TABLE 1: 

LOAD ID, B,C, D, E from [ lib://A.qvd] (qvd)

TABLE 2:

LOAD ID,  X, Y from [ lib://B.qvd] (qvd)

TABKE C: 

LOAD ID, B, C, D RESIDENT TABLE 1;

left join

LOAD ID,  X, Y RESIDENT TABLE 2;

DROP TABLE 1
DROP TABLE 2;

 

TABLE 3: 

LOAD ID, B,C, D, E from [ lib://X.qvd] (qvd);

TABLE 4:

LOAD ID,  X, Y from [ lib://Y.qvd] (qvd);

TABLE  D : 

LOAD ID, B, C, D RESIDENT TABLE 3;

left join

LOAD ID,  X, Y RESIDENT TABLE 4;

DROP TABLE 3;
DROP TABLE 4;

Now at this point I have 2 tables, TABLE C and TABLE D, with similar column structure , i.e. ID, B, C, D, X, Y , where,  as the column names matches , it is creating automatic association in QS by creating a synthetic key on all columns which is expected. But I want to restrict that and create a  table  by making the join based on column C and D only. is there any other ways than to renaming / creating aliases for all the columns other than C and D?

1 Solution

Accepted Solutions
Stanley_
Contributor
Contributor

  1. Using QUALIFY. This enforces QlikView to qualify all/selected fields. 
  2. Autonumber. If you need to concat the Syn Key candidate fields and create your own key, you can use Autonumber/Autonumberhash128/Autonumberhash256 function. 
  3. Aliasing.

View solution in original post

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

There is no way to define table associations other than implicitly by field name.  So if you want separate tables and no synkey, you will have to change some names. 

-Rob

Stanley_
Contributor
Contributor

  1. Using QUALIFY. This enforces QlikView to qualify all/selected fields. 
  2. Autonumber. If you need to concat the Syn Key candidate fields and create your own key, you can use Autonumber/Autonumberhash128/Autonumberhash256 function. 
  3. Aliasing.
PrashantSangle

Hi @noviceneil , all the solution is already suggested by Rob sir & Stanley. But I have curiosity that why you don't want to do aliasing field , any specific reason behind it.

 

Regards,

 

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
noviceneil
Partner - Contributor III
Partner - Contributor III
Author

Hi Prashant,

                         typical business use case...and also quite a number of columns I have in those tables. FOr later handling as well I didn't want to make alias.